修复正在下载的歌曲暂停任务后,再开始会导致程序卡死的问题

This commit is contained in:
lyswhut
2022-04-13 11:08:29 +08:00
parent 68798a9627
commit 737d00f550
2 changed files with 3 additions and 1 deletions
+2 -1
View File
@@ -236,7 +236,7 @@ const saveMeta = function({ downloadInfo, filePath, isUseOtherSource, isEmbedPic
: Promise.resolve(),
]
Promise.all(tasks).then(([imgUrl, lyrics = {}]) => {
if (lyrics.lyric) lyrics.lyric = fixKgLyric(lyrics.lyric)
if (lyrics?.lyric) lyrics.lyric = fixKgLyric(lyrics.lyric)
setMeta(filePath, {
title: downloadInfo.metadata.musicInfo.name,
artist: downloadInfo.metadata.musicInfo.singer,
@@ -565,6 +565,7 @@ const actions = {
if (!result) return
downloadInfo = result
}
commit('setStatus', { downloadInfo, status: downloadStatus.RUN })
let dl = dls[downloadInfo.key]
if (dl) {