修复播放下载列表时存在失效的歌曲会导致切歌不准确的问题

pull/733/head
lyswhut 2021-11-13 23:29:00 +08:00
parent 3a371f8d75
commit be7b06f5c8
2 changed files with 4 additions and 3 deletions

View File

@ -1,3 +1,4 @@
### 修复
- 修复设置-控制按钮位置选项与下载歌词编码格式选项命名冲突导致选项显示异常的问题
- 修复播放下载列表时存在失效的歌曲会导致切歌不准确的问题

View File

@ -192,7 +192,7 @@ const getters = {
// listPlayIndex,
// isPlayList,
// isTempPlay,
// // musicInfo: state.playMusicInfo.musicInfo,
// musicInfo: state.playMusicInfo.musicInfo,
// })
// console.log(state.playMusicInfo)
@ -305,7 +305,7 @@ const actions = {
})
if (!filteredList.length) return commit('setPlayMusicInfo', null)
let listPlayIndex = playInfo.listPlayIndex
let listPlayIndex = filteredList.indexOf(state.listInfo.list[playInfo.listPlayIndex])
const currentListLength = state.listInfo.list.length - 1
if (listPlayIndex == -1 && currentListLength) {
listPlayIndex = prevListPlayIndex >= currentListLength ? 0 : prevListPlayIndex + 1
@ -380,7 +380,7 @@ const actions = {
})
if (!filteredList.length) return commit('setPlayMusicInfo', null)
let listPlayIndex = playInfo.listPlayIndex
let listPlayIndex = filteredList.indexOf(state.listInfo.list[playInfo.listPlayIndex])
const currentListLength = state.listInfo.list.length - 1
if (listPlayIndex == -1 && currentListLength) {
listPlayIndex = prevListPlayIndex > currentListLength ? currentListLength : prevListPlayIndex - 1