From 9c33a4ab283d07a8b3853be0350a2f580a50c0c0 Mon Sep 17 00:00:00 2001 From: Mosh Feu Date: Fri, 11 Jan 2019 00:27:23 +0200 Subject: [PATCH] Resolve the problem with spaces in artist and title See https://github.com/fluent-ffmpeg/node-fluent-ffmpeg/issues/589#issuecomment-453266926 --- lib/YoutubeMp3Downloader.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/YoutubeMp3Downloader.js b/lib/YoutubeMp3Downloader.js index 77b1366..72f37bd 100644 --- a/lib/YoutubeMp3Downloader.js +++ b/lib/YoutubeMp3Downloader.js @@ -136,8 +136,6 @@ YoutubeMp3Downloader.prototype.performDownload = function(task, callback) { }); var outputOptions = [ "-id3v2_version", "4", - "-metadata", "title=" + title, - "-metadata", "artist=" + artist ]; if (self.outputOptions) { outputOptions = outputOptions.concat(self.outputOptions); @@ -150,7 +148,8 @@ YoutubeMp3Downloader.prototype.performDownload = function(task, callback) { .audioBitrate(info.formats[0].audioBitrate) .withAudioCodec("libmp3lame") .toFormat("mp3") - .outputOptions(outputOptions) + .addOutputOption("-metadata", `title=${title}`) + .addOutputOption("-metadata", `artist=${artist}`) .on("error", function(err) { callback(err.message, null); })