youtube-mp3-downloader
Advanced tools
Comparing version 0.7.2 to 0.7.3
@@ -22,2 +22,3 @@ 'use strict'; | ||
this.outputOptions = (options && options.outputOptions ? options.outputOptions : []); | ||
this.allowWebm = (options && options.allowWebm ? options.allowWebm : false); | ||
@@ -100,7 +101,14 @@ if (options && options.ffmpegPath) { | ||
//Stream setup | ||
const stream = ytdl.downloadFromInfo(info, { | ||
const streamOptions = { | ||
quality: self.youtubeVideoQuality, | ||
requestOptions: self.requestOptions | ||
}); | ||
}; | ||
if (!self.allowWebm) { | ||
streamOptions.filter = format => format.container === 'mp4'; | ||
} | ||
const stream = ytdl.downloadFromInfo(info, streamOptions); | ||
stream.on('response', function(httpResponse) { | ||
@@ -107,0 +115,0 @@ |
{ | ||
"name": "youtube-mp3-downloader", | ||
"version": "0.7.2", | ||
"version": "0.7.3", | ||
"description": "Downloads Youtube videos (in parallel, as streams), encodes the audio data as mp3 and stores them in a defineable location", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -40,3 +40,4 @@ # Youtube MP3 Downloader | ||
"queueParallelism": 2, // Download parallelism (default: 1) | ||
"progressTimeout": 2000 // Interval in ms for the progress reports (default: 1000) | ||
"progressTimeout": 2000, // Interval in ms for the progress reports (default: 1000) | ||
"allowWebm": false // Enable download from WebM sources (default: false) | ||
}); | ||
@@ -189,2 +190,1 @@ | ||
``` | ||
@@ -9,2 +9,3 @@ declare module YoutubeMp3Downloader { | ||
progressTimeout: number; | ||
allowWebm?: boolean | ||
} | ||
@@ -11,0 +12,0 @@ |
15488
177