修复批量下载

pull/733/head
lyswhut 2021-12-04 00:00:19 +08:00
parent 2dfa93383f
commit f79ae1541d
2 changed files with 4 additions and 4 deletions

View File

@ -365,7 +365,7 @@ const actions = {
},
createDownloadMultiple({ state, rootState, commit, dispatch }, { list, type }) {
if (!list.length) return
const downloadList = list.map(musicInfo => {
const taskList = list.map(musicInfo => {
return createDownloadInfo({
musicInfo,
type,
@ -373,8 +373,8 @@ const actions = {
savePath: rootState.setting.download.savePath,
list: downloadList,
})
})
commit('addTasks', { list: downloadList, addMusicLocationType: rootState.setting.list.addMusicLocationType })
}).filter(task => task)
commit('addTasks', { list: taskList, addMusicLocationType: rootState.setting.list.addMusicLocationType })
let result = getStartTask(downloadList, downloadStatus, rootState.setting.download.maxDownloadNum)
while (result) {
dispatch('startTask', result)

View File

@ -47,7 +47,7 @@ export default {
if (!body.data?.lrclist?.length) return Promise.reject(new Error('Get lyric failed'))
const { lrc, lrcT } = this.sortLrcArr(body.data.lrclist)
// console.log(body.data.lrclist)
console.log(lrc, lrcT)
// console.log(lrc, lrcT)
// console.log({
// lyric: decodeName(this.transformLrc(body.data.songinfo, lrc)),
// tlyric: decodeName(this.transformLrc(body.data.songinfo, lrcT)),