Change exception to return empty string for lyrics

Return an empty string instead of raising an exception for unsynced lyrics.
This commit is contained in:
itouakirai
2025-11-10 01:09:58 +08:00
committed by GitHub
parent 653e57ad0d
commit 2f754f9b4d

View File

@@ -96,7 +96,8 @@ def ttml_convent_to_lrc(ttml: str) -> str:
h, m, s, ms = 0, 0, 0, 0
lyric_time: str = lyric.get("begin")
if not lyric_time:
raise NotTimeSyncedLyricsException
return ""
#raise NotTimeSyncedLyricsException
if lyric_time.find('.') == -1:
lyric_time += '.000'
match lyric_time.count(":"):