From 2ea4ff35b18c98559646591f86432888d8a38d4d Mon Sep 17 00:00:00 2001 From: michilyy <152296764+michilyy@users.noreply.github.com> Date: Fri, 6 Jun 2025 10:10:39 +0200 Subject: [PATCH] fix lyrics is a list bug. --- swingmusic/lib/lyrics.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/swingmusic/lib/lyrics.py b/swingmusic/lib/lyrics.py index 3749f33a..3b465b7f 100644 --- a/swingmusic/lib/lyrics.py +++ b/swingmusic/lib/lyrics.py @@ -186,13 +186,16 @@ def get_lyrics_from_tags(trackhash: str, just_check: bool = False): if just_check: return lyrics is not None - if lyrics: + if isinstance(lyrics, list): + lyrics = lyrics[0] + + if isinstance(lyrics, str): lyrics = lyrics.replace("engdesc", "") else: return None, False, "" lines = lyrics.split("\n") - synced = test_is_synced(lines[:15]) + synced = test_is_synced(lines[5:15]) if synced: return format_synced_lyrics(lines), synced, copyright