Skip to content

Commit

Permalink
Audio filter added; slows down downloads tremendously
Browse files Browse the repository at this point in the history
  • Loading branch information
Malte311 committed Nov 12, 2019
1 parent 175e5ee commit 62f786c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "YouTube-Audio-Downloader",
"version": "0.9.4",
"version": "0.9.5",
"description": "Download audio tracks from YouTube videos.",
"main": "./src/javascripts/main.js",
"scripts": {
Expand Down
4 changes: 3 additions & 1 deletion src/javascripts/videos.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ function downloadVideo(url, totalDls, current, title = undefined, chTitle = unde
});
} else {
title = title.replace(/[^a-z0-9]/gi, '_').toLowerCase();
let video = ytdl(url);
let video = ytdl(url, {
filter: 'audioonly'
});
video.pipe(fs.createWriteStream(`${config.outputPath}${config.autoNumber} - ${title}.mp3`));

let $divId = multi ? 'dl-progress' : 'dl-progress-single';
Expand Down

0 comments on commit 62f786c

Please sign in to comment.