修复下载过程中出错重试5次都失败后不会自动开始下一个任务的Bug
parent
2ff0f4b102
commit
f534e11acb
|
@ -1,8 +1,4 @@
|
|||
### 优化
|
||||
|
||||
- 新增歌曲URL存储,当URL无效时才重新获取,以减少接口不稳定的影响
|
||||
|
||||
### 修复
|
||||
|
||||
- 修复歌曲加载无法加载时自动切换混乱的Bug
|
||||
- 修复移除列表最后一首歌曲时播放器不停止播放的问题
|
||||
- 修复下载过程中出错重试5次都失败后不会自动开始下一个任务的Bug
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ export default {
|
|||
},
|
||||
defaultList: {
|
||||
handler(n) {
|
||||
console.log(n)
|
||||
// console.log(n)
|
||||
this.electronStore.set('list.defaultList', n)
|
||||
},
|
||||
deep: true,
|
||||
|
|
|
@ -296,7 +296,7 @@ export default {
|
|||
}
|
||||
if (!list.length) return this.setPlayIndex(-1)
|
||||
let playIndex = this.list === list ? this.playIndex : list.indexOf(this.list[this.playIndex])
|
||||
console.log(playIndex)
|
||||
// console.log(playIndex)
|
||||
let index
|
||||
switch (this.setting.player.togglePlayMethod) {
|
||||
case 'listLoop':
|
||||
|
|
|
@ -138,10 +138,13 @@ const actions = {
|
|||
console.log('on complate')
|
||||
},
|
||||
onError(err) {
|
||||
console.log(err.code, err.message)
|
||||
// console.log(err.code, err.message)
|
||||
commit('onError', downloadInfo)
|
||||
// console.log(tryNum[downloadInfo.key])
|
||||
if (++tryNum[downloadInfo.key] > 5) return
|
||||
if (++tryNum[downloadInfo.key] > 5) {
|
||||
_this.dispatch('download/startTask')
|
||||
return
|
||||
}
|
||||
let code
|
||||
if (err.message.includes('Response status was')) {
|
||||
code = err.message.replace(/Response status was (\d+)$/, '$1')
|
||||
|
@ -170,9 +173,7 @@ const actions = {
|
|||
console.log(err)
|
||||
_this.dispatch('download/startTask')
|
||||
})
|
||||
return
|
||||
}
|
||||
_this.dispatch('download/startTask')
|
||||
},
|
||||
// onStateChanged(state) {
|
||||
// console.log(state)
|
||||
|
|
Loading…
Reference in New Issue