fix: in old lyrics some lines would be missing ms digits like '06:06'. And in this case we would manually add dummy one at last.

pull/8/head
Xie, Tianshi 6 months ago
parent 39976d144b
commit d437975744
  1. 2
      src/utils.py

@ -84,6 +84,8 @@ def ttml_convent_to_lrc(ttml: str) -> str:
lyric_time: str = lyric.get("begin")
if not lyric_time:
raise NotTimeSyncedLyricsException
if lyric_time.find('.') == -1:
lyric_time += '.000'
match lyric_time.count(":"):
case 0:
split_time = lyric_time.split(".")

Loading…
Cancel
Save