youtube-mp3-downloader
Advanced tools
Comparing version 0.6.2 to 0.6.3
@@ -87,6 +87,9 @@ "use strict"; | ||
} else { | ||
// Map new structure to old one | ||
info = info.player_response.videoDetails; | ||
var videoTitle = self.cleanFileName(info.title); | ||
var artist = "Unknown"; | ||
var title = "Unknown"; | ||
var thumbnail = info.iurlhq || null; | ||
var thumbnail = info.thumbnail.thumbnails[0].url || null; | ||
@@ -104,6 +107,8 @@ if (videoTitle.indexOf("-") > -1) { | ||
//Derive file name, if given, use it, if not, from video title | ||
var fileName = (task.fileName ? self.outputPath + "/" + task.fileName : self.outputPath + "/" + (sanitize(videoTitle) || info.video_id) + ".mp3"); | ||
var fileName = (task.fileName ? self.outputPath + "/" + task.fileName : self.outputPath + "/" + (sanitize(videoTitle) || info.videoId) + ".mp3"); | ||
ytdl.getInfo(videoUrl, { quality: self.youtubeVideoQuality }, function(err, info) { | ||
if (err) callback(err, null); | ||
//Stream setup | ||
@@ -110,0 +115,0 @@ var stream = ytdl.downloadFromInfo(info, { |
{ | ||
"name": "youtube-mp3-downloader", | ||
"version": "0.6.2", | ||
"version": "0.6.3", | ||
"description": "Downloads Youtube videos (in parallel, as streams), encodes the audio data as mp3 and stores them in a defineable location", | ||
@@ -25,3 +25,3 @@ "keywords": [ | ||
"sanitize-filename": "^1.6.1", | ||
"ytdl-core": "^0.29.3" | ||
"ytdl-core": "^0.29.5" | ||
}, | ||
@@ -28,0 +28,0 @@ "author": { |
15859
177
Updatedytdl-core@^0.29.5