优化播放歌曲换源匹配

This commit is contained in:
lyswhut
2021-01-18 16:21:57 +08:00
parent 4c44310fea
commit 1af3cd1d77
3 changed files with 47 additions and 39 deletions
+14
View File
@@ -57,6 +57,20 @@ const mutations = {
if (defaultList != null) Object.assign(state.defaultList, { list: defaultList.list, location: defaultList.location })
if (loveList != null) Object.assign(state.loveList, { list: loveList.list, location: loveList.location })
if (userList != null) state.userList = userList
if (window.localStorage.getItem('isResetOtherSource') != '1') {
for (const item of defaultList.list) {
if (item.otherSource) item.otherSource = null
}
for (const item of loveList.list) {
if (item.otherSource) item.otherSource = null
}
for (const list of userList) {
for (const item of list.list) {
if (item.otherSource) item.otherSource = null
}
}
window.localStorage.setItem('isResetOtherSource', '1')
}
allListInit(state.defaultList, state.loveList, state.userList)
state.isInitedList = true
},