diff --git a/publish/changeLog.md b/publish/changeLog.md index 35e0faa5..e8399391 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -6,6 +6,7 @@ - 同时删除一首歌以上时将需要二次确认删除 - 禁用透明窗口时右侧不再偏移5px距离(在win7、Ubuntu等系统上测试发现不偏移也不影响滚动条的拖动了) +- 删除未下载完成的任务时,只同时尝试删除已有下载进度的本地文件 ### 修复 diff --git a/src/renderer/store/modules/download.js b/src/renderer/store/modules/download.js index be2d85e1..2159509e 100644 --- a/src/renderer/store/modules/download.js +++ b/src/renderer/store/modules/download.js @@ -519,7 +519,8 @@ const actions = { delete dls[item.key] } commit('removeTask', item) - if (item.status != downloadStatus.COMPLETED) { + // 没有未完成、已下载大于1k + if (item.status != downloadStatus.COMPLETED && item.progress.total && item.progress.downloaded > 1024) { try { await deleteFile(item.metadata.filePath) } catch (_) {} @@ -541,7 +542,8 @@ const actions = { delete dls[item.key] } } - if (item.status != downloadStatus.COMPLETED) { + // 没有未完成、已下载大于1k + if (item.status != downloadStatus.COMPLETED && item.progress.total && item.progress.downloaded > 1024) { deleteFile(item.metadata.filePath).catch(_ => _) } }