修复封面图片嵌入后没有被删除的问题

pull/1761/head
lyswhut 2024-01-26 16:14:25 +08:00
parent b0a9cd70ac
commit b127a1e98c
1 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
const NodeID3 = require('node-id3')
const path = require('path')
// const fs = require('fs')
const fs = require('fs')
const download = require('./downloader')
const extReg = /^(\.(?:jpe?g|png)).*$/
@ -30,9 +30,9 @@ module.exports = (filePath, meta) => {
if (success) {
meta.APIC = picPath
handleWriteMeta(meta, filePath)
// fs.unlink(picPath, err => {
// if (err) console.log(err.message)
// })
fs.unlink(picPath, err => {
if (err) console.log(err.message)
})
} else {
delete meta.APIC
handleWriteMeta(meta, filePath)