修复封面图片嵌入后没有被删除的问题
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
const NodeID3 = require('node-id3')
|
const NodeID3 = require('node-id3')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
// const fs = require('fs')
|
const fs = require('fs')
|
||||||
const download = require('./downloader')
|
const download = require('./downloader')
|
||||||
const extReg = /^(\.(?:jpe?g|png)).*$/
|
const extReg = /^(\.(?:jpe?g|png)).*$/
|
||||||
|
|
||||||
@@ -30,9 +30,9 @@ module.exports = (filePath, meta) => {
|
|||||||
if (success) {
|
if (success) {
|
||||||
meta.APIC = picPath
|
meta.APIC = picPath
|
||||||
handleWriteMeta(meta, filePath)
|
handleWriteMeta(meta, filePath)
|
||||||
// fs.unlink(picPath, err => {
|
fs.unlink(picPath, err => {
|
||||||
// if (err) console.log(err.message)
|
if (err) console.log(err.message)
|
||||||
// })
|
})
|
||||||
} else {
|
} else {
|
||||||
delete meta.APIC
|
delete meta.APIC
|
||||||
handleWriteMeta(meta, filePath)
|
handleWriteMeta(meta, filePath)
|
||||||
|
|||||||
Reference in New Issue
Block a user