fix: adapt lrc two digit ms standard

pull/10/head
WorldObservationLog 7 months ago
parent 5b613e4d86
commit 4f272b5ab7
  1. 3
      main.go
  2. 1
      main_atmos.go
  3. 1
      main_select.go

@ -1256,7 +1256,8 @@ func conventTTMLToLRC(ttml string) (string, error) {
text = lyric.SelectAttr("text").Value text = lyric.SelectAttr("text").Value
} }
m += h * 60 m += h * 60
lrcLines = append(lrcLines, fmt.Sprintf("[%02d:%02d.%03d]%s", m, s, ms, text)) ms = ms / 10
lrcLines = append(lrcLines, fmt.Sprintf("[%02d:%02d.%02d]%s", m, s, ms, text))
} }
} }
return strings.Join(lrcLines, "\n"), nil return strings.Join(lrcLines, "\n"), nil

@ -1290,6 +1290,7 @@ func conventTTMLToLRC(ttml string) (string, error) {
text = lyric.SelectAttr("text").Value text = lyric.SelectAttr("text").Value
} }
m += h * 60 m += h * 60
ms = ms / 10
lrcLines = append(lrcLines, fmt.Sprintf("[%02d:%02d.%03d]%s", m, s, ms, text)) lrcLines = append(lrcLines, fmt.Sprintf("[%02d:%02d.%03d]%s", m, s, ms, text))
} }
} }

@ -1290,6 +1290,7 @@ func conventTTMLToLRC(ttml string) (string, error) {
text = lyric.SelectAttr("text").Value text = lyric.SelectAttr("text").Value
} }
m += h * 60 m += h * 60
ms = ms / 10
lrcLines = append(lrcLines, fmt.Sprintf("[%02d:%02d.%03d]%s", m, s, ms, text)) lrcLines = append(lrcLines, fmt.Sprintf("[%02d:%02d.%03d]%s", m, s, ms, text))
} }
} }

Loading…
Cancel
Save