新增FLAC格式音乐标签信息写入

This commit is contained in:
lyswhut
2020-03-21 22:31:02 +08:00
parent bc7c3968b6
commit 83f0ca918a
12 changed files with 1072 additions and 384 deletions
+7 -1
View File
@@ -91,7 +91,7 @@ const getUrl = (downloadInfo, isRefresh) => {
* @param {*} isEmbedPic // 是否嵌入图片
*/
const saveMeta = (downloadInfo, filePath, isEmbedPic) => {
if (downloadInfo.type === 'ape' || downloadInfo.type === 'flac') return
if (downloadInfo.type === 'ape') return
const promise = isEmbedPic
? downloadInfo.musicInfo.img
? Promise.resolve(downloadInfo.musicInfo.img)
@@ -104,6 +104,12 @@ const saveMeta = (downloadInfo, filePath, isEmbedPic) => {
album: downloadInfo.musicInfo.albumName,
APIC: url,
})
}).catch(() => {
setMeta(filePath, {
title: downloadInfo.musicInfo.name,
artist: downloadInfo.musicInfo.singer,
album: downloadInfo.musicInfo.albumName,
})
})
}
-1
View File
@@ -9,7 +9,6 @@ import { getProxyInfo } from './index'
const request = (url, options, callback) => {
let data
if (options.method == 'get') options.headers['Content-Length'] = 0
if (options.body) {
data = options.body
} else if (options.form) {