新增对kw源卡拉OK歌词的支持

This commit is contained in:
lyswhut
2022-03-14 10:02:31 +08:00
parent 1fd3e6c9fa
commit 545ba6521b
4 changed files with 140 additions and 10 deletions
+10 -1
View File
@@ -188,6 +188,7 @@ const actions = {
},
async getLrc({ commit, state }, musicInfo) {
const lrcInfo = await getStoreLyric(musicInfo)
// lrcInfo = {}
// if (lrcRequest && lrcRequest.cancelHttp) lrcRequest.cancelHttp()
if (lrcInfo.lyric && lrcInfo.tlyric != null) {
// if (musicInfo.lrc.startsWith('\ufeff[id:$00000000]')) {
@@ -198,7 +199,15 @@ const actions = {
// commit('setLrc', { musicInfo, lyric: str, tlyric: musicInfo.tlrc, lxlyric: musicInfo.tlrc })
// }
if ((lrcInfo.lxlyric == null && musicInfo.source != 'kg') || lrcInfo.lxlyric != null) return lrcInfo
if (lrcInfo.lxlyric == null) {
switch (musicInfo.source) {
case 'kg':
case 'kw':
break
default:
return lrcInfo
}
} else return lrcInfo
}
// lrcRequest = music[musicInfo.source].getLyric(musicInfo)