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

Commit

Permalink
store example videos in dir to keep things cleaner
Browse files Browse the repository at this point in the history
  • Loading branch information
fent committed May 9, 2015
1 parent d2d4eba commit e7cc0d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion example/download.js
Expand Up @@ -13,7 +13,7 @@ video.on('info', function(info) {
size = info.size;
console.log('Got video info');
console.log('saving to ' + info._filename);
var output = path.join(__dirname, info._filename);
var output = path.join(__dirname, 'videos', info._filename);
video.pipe(fs.createWriteStream(output));
});

Expand Down
3 changes: 1 addition & 2 deletions example/playlist.js
Expand Up @@ -2,7 +2,6 @@ var path = require('path');
var fs = require('fs');
var ytdl = require('..');

/* jshint maxlen:false */
var video = ytdl('https://www.youtube.com/playlist?list=PLEFA9E9D96CB7F807');

video.on('error', function(err) {
Expand All @@ -12,7 +11,7 @@ video.on('error', function(err) {
var size = 0;
video.on('info', function(info) {
size = info.size;
var output = path.join(__dirname + '/mp4s', size + '.mp4');
var output = path.join(__dirname + '/videos', size + '.mp4');
video.pipe(fs.createWriteStream(output));
});

Expand Down

0 comments on commit e7cc0d5

Please sign in to comment.