修复某些情况下获取URL失败时会意外切歌的问题

pull/733/head
lyswhut 2021-10-29 20:05:11 +08:00
parent 35abdc63d4
commit b27a547fb8
2 changed files with 4 additions and 20 deletions

View File

@ -1,22 +1,3 @@
### 新增
- 添加黑色托盘图标
- 自定义源新增`version`字段,新增`utils.buffer.bufToString`方法
### 优化
- 大幅优化我的列表、下载、歌单、排行榜列表性能,现在即使同一列表内的歌曲很多时也不会卡顿了
- 优化列表同步代码逻辑
- 优化开关评论时的动画性能
- 优化进入、离开播放详情页的性能
- 兼容桌面歌词以触摸的方式移动、调整大小
- 调整图标尺寸
### 修复
- 修复kg源的歌单链接无法打开的问题
- 修复同一首歌的URL、歌词等同时需要换源时的处理问题
### 其他
- 更新 Electron 到 v15.3.0
- 修复某些情况下获取URL失败时会意外切歌的问题

View File

@ -634,6 +634,7 @@ export default {
audio.src = this.musicInfo.url = url
}).catch(err => {
// console.log('err', err.message)
if (targetSong !== this.targetSong || this.isPlay) return
if (err.message == requestMsg.cancelRequest) return
if (!isRetryed) return this.setUrl(targetSong, isRefresh, true)
this.status = this.statusText = err.message
@ -676,8 +677,10 @@ export default {
})
}).catch((err) => {
console.log(err)
if (targetSong.songmid !== this.musicInfo.songmid) return
this.status = this.statusText = this.$t('core.player.lyric_error')
}).finally(() => {
if (targetSong.songmid !== this.musicInfo.songmid) return
this.handleUpdateWinLyricInfo('lyric', { lrc: this.musicInfo.lrc, tlrc: this.musicInfo.tlrc, lxlrc: this.musicInfo.lxlrc })
this.setLyric()
})