Skip to content
This repository has been archived by the owner on Dec 3, 2023. It is now read-only.

Commit

Permalink
Fix - win handling getInfo & getFormats
Browse files Browse the repository at this point in the history
cleanup
  • Loading branch information
przemyslawpluta committed Feb 14, 2014
1 parent 7655ea1 commit 19ccc54
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions lib/youtube-dl.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,22 +156,19 @@ function call(url, args, options, callback) {
args = args.concat(util.parseOpts(options));
args.push(url);

var target = file;
var opt = args;
var opt = [file, args, ''];

if (isWin) {
target = 'python';
opt = args;
}
if (isWin) { opt = ['python', [file].concat(args), '\r']; }

// Call youtube-dl.
execFile(target, opt, function(err, stdout, stderr) {
execFile(opt[0], opt[1], function(err, stdout, stderr) {
if (err) return callback(err);
if (stderr) return callback(new Error(stderr.slice(7)));

var data = stdout.trim().split('\r\n');
var data = stdout.trim().split(opt[2] + '\n');
callback(null, data);
});

}


Expand Down

0 comments on commit 19ccc54

Please sign in to comment.