make lyric lang using iso 639-3 string

This commit is contained in:
aynakeya
2025-08-05 05:37:22 +08:00
parent d4a44300f2
commit baf8756a98
11 changed files with 85 additions and 41 deletions

View File

@@ -5,6 +5,7 @@ import (
"fmt"
"github.com/AynaLivePlayer/miaosic"
"github.com/AynaLivePlayer/miaosic/providers"
"github.com/AynaLivePlayer/miaosic/utils"
"github.com/aynakeya/deepcolor"
"github.com/aynakeya/deepcolor/dphttp"
"github.com/spf13/cast"
@@ -122,7 +123,7 @@ func NewKuwo() *Kuwo {
if len(lrcs) == 0 {
return miaosic.ErrorExternalApi
}
*lyrics = []miaosic.Lyrics{miaosic.ParseLyrics("default", strings.Join(lrcs, "\n"))}
*lyrics = []miaosic.Lyrics{utils.ParseLyricWithLangDetection(strings.Join(lrcs, "\n"))}
return nil
})
kw.SearchApi = deepcolor.CreateApiResultFunc(