From 858cf4041d8d5300d1c76a90a9d6f0b8d7954c38 Mon Sep 17 00:00:00 2001 From: przemyslawpluta Date: Thu, 27 Mar 2014 21:11:46 +0000 Subject: download handouts from syllabus table --- mongo-edu.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'mongo-edu.js') diff --git a/mongo-edu.js b/mongo-edu.js index e35640e..67a8676 100644 --- a/mongo-edu.js +++ b/mongo-edu.js @@ -40,7 +40,7 @@ exports.create = function start() { } }]; - mdbvideos.init(answers, function get(err, data) { + mdbvideos.init(answers, argv, function get(err, data) { if (err !== null) { throw err; } if (data.length) { @@ -55,11 +55,13 @@ exports.create = function start() { function currentList() { inquirer.prompt(classes, function prompt(answers) { - mdbvideos.getList(answers, argv, function get(err, data) { + mdbvideos.getList(answers, argv, function get(err, data, pass) { if (err !== null) { throw err; } if (data.length) { + if (pass) { return showDetails(err, data); } + list[0].message = 'Found ' + data.length + ' List'+ ((data.length > 1)? 's' : '') + '. Select:'; list[0].choices = data; @@ -94,7 +96,7 @@ exports.create = function start() { check[0].choices = data; return inquirer.prompt(check, function prompt(answers) { - videoHandler.download(answers, data); + videoHandler.download(answers, data, argv); }); } -- cgit v1.2.3