From ea0cbb09799d4368974136a06e13953daa396e9a Mon Sep 17 00:00:00 2001 From: Stepland <10530295-Buggyroom@users.noreply.gitlab.com> Date: Mon, 15 Jul 2024 02:18:42 +0200 Subject: [PATCH] Fix yubiosi 1.5 and 2.0 loader not liking a trailing empty line --- jubeatools/formats/yubiosi/load.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jubeatools/formats/yubiosi/load.py b/jubeatools/formats/yubiosi/load.py index eb818a1..c8852b5 100644 --- a/jubeatools/formats/yubiosi/load.py +++ b/jubeatools/formats/yubiosi/load.py @@ -94,7 +94,7 @@ def load_yubiosi_1_5_file(lines: list[str]) -> song.Song: title = tags.get("TITLE_NAME") 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)) 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): if line.startswith("//"): continue + elif not line.strip(): + continue else: try: yield load_1_5_note(line)