set metadata using ffmpeg

This commit is contained in:
Evert Prants 2018-12-10 20:58:54 +02:00
parent c25bfc59fd
commit 4a44e412e7
Signed by: evert
GPG Key ID: 1688DA83D222D0B5

View File

@ -48,10 +48,9 @@ async function download (furl) {
} }
let fn = path.join(musicdir, filename) let fn = path.join(musicdir, filename)
await asn.copyAsync(file.source, fn)
await fs.unlink(file.source)
let id3 = await asn.promiseExec(`id3 -a "${clean.artist}" -t "${clean.title}" "${fn}"`) await asn.promiseExec(`ffmpeg -i "${file.source}" -metadata artist="${clean.artist}" -metadata title="${clean.title}" -codec copy "${fn}"`)
await fs.unlink(file.source)
console.log('=> Done.') console.log('=> Done.')
rl.close() rl.close()