From d437975744c3f0730445c4d1e3c2cbf7a0d22ead Mon Sep 17 00:00:00 2001 From: "Xie, Tianshi" Date: Thu, 16 May 2024 20:21:17 -0400 Subject: [PATCH] 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. --- src/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/utils.py b/src/utils.py index f5504cd..cc478ef 100644 --- a/src/utils.py +++ b/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(".")