We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 00af2eb commit 257dcaeCopy full SHA for 257dcae
core/api/lyrics.py
@@ -35,11 +35,13 @@ def parse(ttml):
35
begin = __get_ts(s.get("begin"))
36
timeSyncedLyrics.append(f"[{begin}]{s.text}")
37
else:
38
- begin = __get_ts(line.get("begin"))
39
- timeSyncedLyrics.append(f"[{begin}]{line.text}")
+ b = line.get("begin")
+ if b:
40
+ begin = __get_ts(b)
41
+ timeSyncedLyrics.append(f"[{begin}]{line.text}")
42
43
return {
44
"lyrics": lyrics,
45
"songwriter": songwriters if len(songwriters) > 0 else None,
46
"timeSyncedLyrics": timeSyncedLyrics
- }
47
+ }
0 commit comments