summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorprzemyslawpluta <przemekpluta@hotmail.com>2015-10-24 10:20:41 +0100
committerprzemyslawpluta <przemekpluta@hotmail.com>2015-10-24 10:20:41 +0100
commit2b91d6514753a372d22d8f4050f020c26ef94684 (patch)
treef3f6e438024a410ccfa2727e1bf39431da6d9ec1 /lib
parent6496336a13d7a484ffac2bfb14f5c88a93a73bac (diff)
downloadmongo-edu-2b91d6514753a372d22d8f4050f020c26ef94684.zip
emit end on close
version bump
Diffstat (limited to 'lib')
-rw-r--r--lib/videos.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/videos.js b/lib/videos.js
index dbdf862..924abd9 100644
--- a/lib/videos.js
+++ b/lib/videos.js
@@ -193,6 +193,10 @@ var handleList = function handleList(list, tags) {
console.log(err.stack);
});
+ dl.on('close', function close() {
+ dl.emit('end');
+ });
+
dl.on('end', function end() {
var left = (currentList.length)? currentList.length + ' left ...' : '';
console.timeEnd('i'.magenta + ' ' + stash._filename + '. Done in');