Merge pull request #9 from itouakirai/main

fix fix
This commit is contained in:
zhaarey 2024-04-25 04:54:49 +08:00 committed by GitHub
commit f746ed9032
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 15 deletions

View File

@ -1228,11 +1228,10 @@ func conventTTMLToLRC(ttml string) (string, error) {
_, err = fmt.Sscanf(lyric.SelectAttr("begin").Value, "%d:%d.%d", &m, &s, &ms)
h = 0
}
if err != nil {
} else {
_, err = fmt.Sscanf(lyric.SelectAttr("begin").Value, "%d.%d", &s, &ms)
h, m = 0, 0
}
}
if err != nil {
return "", err
}

View File

@ -1262,11 +1262,10 @@ func conventTTMLToLRC(ttml string) (string, error) {
_, err = fmt.Sscanf(lyric.SelectAttr("begin").Value, "%d:%d.%d", &m, &s, &ms)
h = 0
}
if err != nil {
} else {
_, err = fmt.Sscanf(lyric.SelectAttr("begin").Value, "%d.%d", &s, &ms)
h, m = 0, 0
}
}
if err != nil {
return "", err
}

View File

@ -1262,11 +1262,10 @@ func conventTTMLToLRC(ttml string) (string, error) {
_, err = fmt.Sscanf(lyric.SelectAttr("begin").Value, "%d:%d.%d", &m, &s, &ms)
h = 0
}
if err != nil {
} else {
_, err = fmt.Sscanf(lyric.SelectAttr("begin").Value, "%d.%d", &s, &ms)
h, m = 0, 0
}
}
if err != nil {
return "", err
}