From fdaee91e3d3b88bd5ae3d5fa35b18d9e765dd936 Mon Sep 17 00:00:00 2001 From: Richard Lindner Date: Fri, 31 Dec 2021 16:27:49 +0100 Subject: [PATCH 1/3] version 0.5.16 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fb2f097..86ca501 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "queueget", - "version": "0.5.15", + "version": "0.5.16", "description": "Download links from a queue file", "bin": { "qget": "./bin/cli.js", From 53ed6d9eef1150539392710bb507ac07e4479a76 Mon Sep 17 00:00:00 2001 From: Richard Lindner Date: Mon, 3 Jan 2022 16:37:24 +0100 Subject: [PATCH 2/3] empty queue should result in termination --- src/filestack.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/filestack.js b/src/filestack.js index b50dba6..bdeba08 100644 --- a/src/filestack.js +++ b/src/filestack.js @@ -19,7 +19,7 @@ const newFilestack = (filepath) => { const unflush = async () => { try { const data = (await readFile(filepath)).toString() - return data.split("\n").map((line) => line.trim()) + return data.length === 0 ? [] : data.split("\n").map((line) => line.trim()) } catch (err) { if (err.code !== "ENOENT") { throw err From 4c616f3e66e8a340f3b0a56858aec208c5b75690 Mon Sep 17 00:00:00 2001 From: Richard Lindner Date: Thu, 6 Jan 2022 11:55:18 +0100 Subject: [PATCH 3/3] fix dot output for small downloads --- src/loader/common.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/loader/common.js b/src/loader/common.js index 40ed092..31242f2 100644 --- a/src/loader/common.js +++ b/src/loader/common.js @@ -114,7 +114,8 @@ const commonload = async ({ contentLoaded += chunk.length // Console update - if ((contentLoaded / contentLength) * MAX_DOTS > dots) { + const contentLoadedDots = (contentLoaded / contentLength) * MAX_DOTS + while (contentLoadedDots > dots) { dots++ process.stdout.write(".") }