From 3c970c24c1ba9b4cd3d0c13d36cfcb59fdd0b17d Mon Sep 17 00:00:00 2001 From: lyswhut Date: Tue, 5 Apr 2022 22:08:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8D=A2=E6=BA=90=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E6=97=B6=E7=9A=84=E5=A4=84=E7=90=86=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- publish/changeLog.md | 1 + src/renderer/store/modules/list.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/publish/changeLog.md b/publish/changeLog.md index 8d7700a9..815b03de 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -22,6 +22,7 @@ - 修复窗口尺寸设置对应的字体大小在启动后不生效的问题 - 修复wy源搜索某些歌曲时第一页之后的歌曲无法加载的问题 - 修复使用Scheme URL搜索歌曲时,不会自动关闭播放详情页(若处于打开状态)的问题 +- 修复换源失败时的处理问题 ### 变更 diff --git a/src/renderer/store/modules/list.js b/src/renderer/store/modules/list.js index c5c5c340..653b75cc 100644 --- a/src/renderer/store/modules/list.js +++ b/src/renderer/store/modules/list.js @@ -31,8 +31,9 @@ const actions = { if (getOtherSourcePromises.has(key)) return getOtherSourcePromises.get(key) const promise = musicSdk.findMusic(musicInfo).then(otherSource => { commit('setOtherSource', { musicInfo, otherSource }) - if (getOtherSourcePromises.has(key)) getOtherSourcePromises.delete(key) return otherSource + }).finally(() => { + if (getOtherSourcePromises.has(key)) getOtherSourcePromises.delete(key) }) getOtherSourcePromises.set(key, promise) return promise