From fe3379ffbb288697255b7f158d22bfd42bced106 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Sun, 8 Aug 2021 11:54:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=9A=8F=E6=9C=BA=E6=92=AD?= =?UTF-8?q?=E6=94=BE=E4=B8=8B=E6=97=A0=E6=B3=95=E5=88=87=E6=AD=8C=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- publish/changeLog.md | 11 +---------- src/renderer/store/modules/player.js | 6 ++++-- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/publish/changeLog.md b/publish/changeLog.md index e305bab2..585fe1c3 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -1,12 +1,3 @@ -### 新增 - -- 新增局域网同步功能(实验性,首次使用前建议先备份一次列表),此功能需要配合PC端使用,移动端与PC端处在同一个局域网(路由器的网络)下时,可以多端实时同步歌曲列表,使用问题请看"常见问题"。 - -### 优化 - -- 添加播放器对系统媒体控制与显示的兼容处理,现在在windows下的锁屏界面可以正确显示当前播放的音乐信息及切换歌曲了 - ### 修复 -- 修复导入kg歌单最多只能加载100、500首歌曲的问题。注:现在可以加载1000+首歌曲的歌单,但出于未知原因会导致部分歌曲无法加载(可能是无版权导致的),目前酷狗码仍然最多只能加载500首歌 -- 修复某些情况下所显示的歌词、封面图片与当前正在播放的歌曲不一致的问题 +- 修复随机播放下无法切歌的问题 diff --git a/src/renderer/store/modules/player.js b/src/renderer/store/modules/player.js index 4f6c5ef7..91e708f6 100644 --- a/src/renderer/store/modules/player.js +++ b/src/renderer/store/modules/player.js @@ -252,7 +252,7 @@ const actions = { if (state.playedList.length) { // 从已播放列表移除播放列表已删除的歌曲 let index - for (index = state.playedList.findIndex(m => m.songmid === state.playMusicInfo.musicInfo.songmid) - 1; index > -1; index--) { + for (index = state.playedList.findIndex(m => m.musicInfo.songmid === state.playMusicInfo.musicInfo.songmid) - 1; index > -1; index--) { const playMusicInfo = state.playedList[index] if (playMusicInfo.listId == currentListId && !currentList.some(m => m.songmid === playMusicInfo.musicInfo.songmid)) { commit('removePlayedList', index) @@ -322,10 +322,11 @@ const actions = { } const currentListId = state.listInfo.id const currentList = state.listInfo.list + console.log(currentListId) if (state.playedList.length) { // 从已播放列表移除播放列表已删除的歌曲 let index - for (index = state.playedList.findIndex(m => m.songmid === state.playMusicInfo.musicInfo.songmid) + 1; index < state.playedList.length; index++) { + for (index = state.playedList.findIndex(m => m.musicInfo.songmid === state.playMusicInfo.musicInfo.songmid) + 1; index < state.playedList.length; index++) { const playMusicInfo = state.playedList[index] if (playMusicInfo.listId == currentListId && !currentList.some(m => m.songmid === playMusicInfo.musicInfo.songmid)) { commit('removePlayedList', index) @@ -362,6 +363,7 @@ const actions = { } let currentIndex = filteredList.findIndex(m => m.songmid == currentMusic.songmid) let nextIndex = currentIndex + console.log(currentIndex) switch (rootState.setting.player.togglePlayMethod) { case 'listLoop': nextIndex = currentIndex === filteredList.length - 1 ? 0 : currentIndex + 1