diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/videos.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/videos.js b/lib/videos.js index 9b60aeb..a3471cc 100644 --- a/lib/videos.js +++ b/lib/videos.js @@ -34,7 +34,7 @@ var handleList = function handleList(list) { 'use strict'; var currentList = list, - opt = (!ncc) ? ['--max-quality=18'] : ['--max-quality=18', '--no-check-certificate']; + opt = (!ncc) ? ['--max-quality=22'] : ['--max-quality=22', '--no-check-certificate']; if (cc) { opt = opt.concat(['--write-srt', '--srt-lang=en']); } @@ -218,17 +218,17 @@ module.exports = { var isWin = /^win/.test(process.platform), file = path.join(__dirname, '..', 'node_modules/youtube-dl/bin', 'youtube-dl'), - options = [file, args, '']; + options = [file, args]; setOptions(argv); - if (isWin) { options = ['python', [file].concat(args), '\r']; } + if (isWin) { options = ['python', [file].concat(args)]; } execFile(options[0], options[1], function(err, stdout, stderr) { if (err !== null) { return callback(err); } if (stderr) { return callback(new Error(stderr.slice(7))); } - var data = stdout.trim().split(options[2] + '\n'); + var data = stdout.trim().split(/\r?\n/); var out = [], total = data.length, count = 0; if (data.length) { |