summaryrefslogtreecommitdiff
path: root/lib/videos.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/videos.js')
-rw-r--r--lib/videos.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/videos.js b/lib/videos.js
index f569407..a71d4e3 100644
--- a/lib/videos.js
+++ b/lib/videos.js
@@ -19,7 +19,8 @@ var path = require('path'),
mv = require('mv'),
_ = require('lodash');
-var downloadPath = '', proxy = '', downloadList = [], co = false, ncc = false, handout = false, cc = false, uz = false, hq = false, verbose = false;
+var isDebug = /[debug]/, downloadPath = '', proxy = '', downloadList = [],
+ co = false, ncc = false, handout = false, cc = false, uz = false, hq = false, verbose = false;
function setOptions(argv) {
@@ -239,6 +240,8 @@ module.exports = {
youtubedl.getInfo(item, options, function(err, info) {
+ if (verbose && isDebug.test(err)) { console.log(err); }
+
items.push((!err)?{name: info.title + ' - ' + info.resolution, value: item, id: i}:{name: 'No info: ' + item, value: item, id: i});
count = count - 1;
@@ -307,6 +310,8 @@ module.exports = {
youtubedl.getInfo(opt.url, options, function(err, info) {
+ if (verbose && isDebug.test(err)) { console.log(err); }
+
if (info.length) {
for (i = 0; i < info.length; i++) {
item = 'https://www.youtube.com/watch?v=' + info[i].id;