支持flac文件歌词写入

This commit is contained in:
lyswhut
2020-07-03 09:16:20 +08:00
parent 3b25e0a112
commit a5243ff58c
7 changed files with 9 additions and 10 deletions
-1
View File
@@ -10,7 +10,6 @@ const extReg = /^(\.(?:jpe?g|png)).*$/
const vendor = 'reference libFLAC 1.2.1 20070917'
const writeMeta = async(filePath, meta, picPath) => {
if (meta.lyric) delete meta.lyric
const comments = Object.keys(meta).map(key => `${key.toUpperCase()}=${meta[key] || ''}`)
const data = {
vorbis: {
+3 -3
View File
@@ -5,12 +5,12 @@ const request = require('request')
const extReg = /^(\.(?:jpe?g|png)).*$/
const handleWriteMeta = (meta, filePath) => {
if (meta.lyric) {
if (meta.lyrics) {
meta.unsynchronisedLyrics = {
language: 'zho',
text: meta.lyric,
text: meta.lyrics,
}
delete meta.lyric
delete meta.lyrics
}
NodeID3.write(meta, filePath)
}