diff --git a/publish/changeLog.md b/publish/changeLog.md index c42f5002..6c6ca70c 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -1,3 +1,4 @@ ### 修复 - 修复设置-控制按钮位置选项与下载歌词编码格式选项命名冲突导致选项显示异常的问题 +- 修复播放下载列表时存在失效的歌曲会导致切歌不准确的问题 diff --git a/src/renderer/store/modules/player.js b/src/renderer/store/modules/player.js index 72f4f1a4..235e3624 100644 --- a/src/renderer/store/modules/player.js +++ b/src/renderer/store/modules/player.js @@ -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