Skip to content

Commit

Permalink
Resolve the problem with spaces in artist and title
Browse files Browse the repository at this point in the history
  • Loading branch information
moshfeu committed Jan 10, 2019
1 parent 6ffd41e commit 9c33a4a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/YoutubeMp3Downloader.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
})
Expand Down

0 comments on commit 9c33a4a

Please sign in to comment.