修复某些情况下同步功能会导致切歌混乱的问题

pull/623/head
lyswhut 2021-08-12 10:40:45 +08:00
parent 5b113c5c22
commit 364260b070
2 changed files with 11 additions and 4 deletions

View File

@ -1,6 +1,3 @@
### 修复
- 修复播放下载列表的歌曲时切歌的问题
- 修复播放下载列表的歌曲时歌词无法显示的问题
- 修复下载列表稍后播放功能无效的问题
- 修复同步服务器启动失败时,关闭同步服务不会清空失败信息的问题
- 修复某些情况下同步功能会导致切歌混乱的问题

View File

@ -82,6 +82,16 @@ const mutations = {
setSyncListData(state, { defaultList, loveList, userList }) {
state.defaultList.list.splice(0, state.defaultList.list.length, ...defaultList.list)
state.loveList.list.splice(0, state.loveList.list.length, ...loveList.list)
for (let index = 0; index < userList.length; index++) {
const list = userList[index]
const targetList = allList[list.id]
if (targetList) {
userList.splice(index, 1, targetList)
targetList.name = list.name
targetList.list.splice(0, targetList.list.length, ...list.list)
}
}
console.log()
state.userList = userList
allListInit(state.defaultList, state.loveList, state.userList)
},