新增下载目录存在同名的文件时跳过下载此任务设置

This commit is contained in:
lyswhut
2022-12-30 14:00:49 +08:00
parent 18b6f73008
commit e2a1d7b99d
11 changed files with 80 additions and 39 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
import { DOWNLOAD_STATUS, QUALITYS } from '@common/constants'
import { filterFileName } from '@common/utils/common'
import { joinPath, removeFile } from '@common/utils/nodejs'
import { joinPath } from '@common/utils/nodejs'
import fs from 'fs'
/**
@@ -94,7 +94,7 @@ export const createDownloadInfo = (musicInfo: LX.Music.MusicInfoOnline, type: LX
// 删除同路径下的同名文件
// TODO
void removeFile(downloadInfo.metadata.filePath)
// void removeFile(downloadInfo.metadata.filePath)
// .catch(err => {
// if (err.code !== 'ENOENT') {
// return commit('setStatusText', { downloadInfo, text: '文件删除失败' })