新增FLAC格式音乐标签信息写入
This commit is contained in:
@@ -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,
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user