diff --git a/publish/changeLog.md b/publish/changeLog.md index 9fb7e0a2..4279e660 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -20,6 +20,7 @@ - 修复AppImage包无法运行的问题 - 修复Windows任务栏缩略图工具栏控制按钮的歌曲收藏按钮状态更新问题 - 修复使用链接导入的歌单无法在我的列表打开原歌单详情页的问题 +- 修复播放下载列表的歌曲时增删下载任务导致正在的歌曲序号改变时,不会更新到新增序号的问题 ### 文档 diff --git a/src/renderer/core/useApp/usePlayer/useWatchList.js b/src/renderer/core/useApp/usePlayer/useWatchList.js index 284fbbd5..57cb777e 100644 --- a/src/renderer/core/useApp/usePlayer/useWatchList.js +++ b/src/renderer/core/useApp/usePlayer/useWatchList.js @@ -1,6 +1,6 @@ import { onBeforeUnmount } from '@renderer/utils/vueTools' -import { player as eventPlayerNames, list as eventListNames } from '@renderer/event/names' +import { player as eventPlayerNames, list as eventListNames, download as eventDownloadNames } from '@renderer/event/names' import { playInfo, playMusicInfo, updatePlayIndex } from '@renderer/core/share/player' import { getList } from '@renderer/core/share/utils' import { throttle } from '@renderer/utils' @@ -30,9 +30,15 @@ export default ({ playNext }) => { throttleListChange() } + const handleDownloadListChange = () => { + handleListChange(['download']) + } + window.eventHub.on(eventListNames.listChange, handleListChange) + window.eventHub.on(eventDownloadNames.listChange, handleDownloadListChange) onBeforeUnmount(() => { window.eventHub.off(eventListNames.listChange, handleListChange) + window.eventHub.off(eventDownloadNames.listChange, handleDownloadListChange) }) }