Fix yubiosi 1.5 and 2.0 loader not liking a trailing empty line
This commit is contained in:
parent
4aea1a36dc
commit
ea0cbb0979
@ -94,7 +94,7 @@ def load_yubiosi_1_5_file(lines: list[str]) -> song.Song:
|
|||||||
|
|
||||||
title = tags.get("TITLE_NAME")
|
title = tags.get("TITLE_NAME")
|
||||||
timing = load_timing_data_1_5(tags)
|
timing = load_timing_data_1_5(tags)
|
||||||
notes = [load_1_5_note(line) for line in note_lines]
|
notes = [load_1_5_note(line) for line in note_lines if line.strip()]
|
||||||
level = Decimal(tags.get("LEVEL", 0))
|
level = Decimal(tags.get("LEVEL", 0))
|
||||||
audio = tags.get("AUDIO_FILE")
|
audio = tags.get("AUDIO_FILE")
|
||||||
|
|
||||||
@ -290,6 +290,8 @@ def iter_yubiosi_2_0_notes(lines: list[str]) -> Iterator[song.TapNote]:
|
|||||||
for i, line in enumerate(lines, start=1):
|
for i, line in enumerate(lines, start=1):
|
||||||
if line.startswith("//"):
|
if line.startswith("//"):
|
||||||
continue
|
continue
|
||||||
|
elif not line.strip():
|
||||||
|
continue
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
yield load_1_5_note(line)
|
yield load_1_5_note(line)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user