summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorprzemyslawpluta <przemekpluta@hotmail.com>2016-01-10 11:34:20 +0000
committerprzemyslawpluta <przemekpluta@hotmail.com>2016-01-10 11:34:20 +0000
commiteeefcdad742f40a83d6677e8d1b90bcadaedee8d (patch)
treea5474b95045511d9330762418ca5377e67fcef7e
parent947fbe824b60af01177967be33a8d98fddef571d (diff)
downloadmongo-edu-eeefcdad742f40a83d6677e8d1b90bcadaedee8d.zip
fix progress size
-rw-r--r--lib/videos.js2
-rw-r--r--package.json2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/videos.js b/lib/videos.js
index 1ba0ce7..33df751 100644
--- a/lib/videos.js
+++ b/lib/videos.js
@@ -80,7 +80,7 @@ var handleList = function handleList(list, tags) {
console.log('i'.magenta + ' Downloading: ' + name.cyan);
dlh.on('progress', function(state) {
- if (!bar) { bar = new ProgressBar('>'.green + ' ' + filesize(state.total) + ' [:bar] :percent :etas', { complete: '=', incomplete: ' ', width: 20, total: 100 }); }
+ if (!bar) { bar = new ProgressBar('>'.green + ' ' + filesize(state.size.total) + ' [:bar] :percent :etas', { complete: '=', incomplete: ' ', width: 20, total: 100 }); }
if (!bar.complete && progressSoFar !== state.percent) {
var i;
for (i = 0; i < (state.percent - hold); i++) { bar.tick(); }
diff --git a/package.json b/package.json
index dc5ca39..dd7d9b1 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "mongo-edu",
"preferGlobal": true,
- "version": "0.2.50",
+ "version": "0.2.51",
"author": "Przemyslaw Pluta <przemyslawplutadev@gmail.com> (http://przemyslawpluta.com)",
"description": "Select and download videos and handouts from university.mongodb.com courses",
"main": "./mongo-edu",