修复换源失败时的处理问题

pull/930/merge
lyswhut 2022-04-05 22:08:35 +08:00
parent 93f3507dc8
commit 3c970c24c1
2 changed files with 3 additions and 1 deletions

View File

@ -22,6 +22,7 @@
- 修复窗口尺寸设置对应的字体大小在启动后不生效的问题
- 修复wy源搜索某些歌曲时第一页之后的歌曲无法加载的问题
- 修复使用Scheme URL搜索歌曲时不会自动关闭播放详情页若处于打开状态的问题
- 修复换源失败时的处理问题
### 变更

View File

@ -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