youtube-mp3-downloader
Advanced tools
Comparing version 0.7.5 to 0.7.6
@@ -74,2 +74,3 @@ 'use strict'; | ||
let self = this; | ||
let info; | ||
const videoUrl = this.youtubeBaseUrl+task.videoId; | ||
@@ -79,5 +80,9 @@ let resultObj = { | ||
}; | ||
try { | ||
info = await ytdl.getInfo(videoUrl, { quality: this.youtubeVideoQuality }) | ||
} catch (err){ | ||
callback(err); | ||
} | ||
const info = await ytdl.getInfo(videoUrl, { quality: this.youtubeVideoQuality }) | ||
var videoTitle = this.cleanFileName(info.videoDetails.title); | ||
@@ -114,2 +119,6 @@ var artist = 'Unknown'; | ||
stream.on('error', function(err){ | ||
callback(err, null); | ||
}); | ||
stream.on('response', function(httpResponse) { | ||
@@ -116,0 +125,0 @@ |
{ | ||
"name": "youtube-mp3-downloader", | ||
"version": "0.7.5", | ||
"version": "0.7.6", | ||
"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.3", | ||
"ytdl-core": "^4.0.1" | ||
"ytdl-core": "^4.0.4" | ||
}, | ||
@@ -28,0 +28,0 @@ "author": { |
15768
187
Updatedytdl-core@^4.0.4