From 6fee70ec456af548d27a89d56f9c405fa8166fae Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue, 19 Sep 2023 23:28:20 -0700 Subject: [PATCH] Fix jdownloader remaining after download complete (#2032) --- src/widgets/jdownloader/proxy.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/widgets/jdownloader/proxy.js b/src/widgets/jdownloader/proxy.js index da8214fc2..cc934a6ba 100644 --- a/src/widgets/jdownloader/proxy.js +++ b/src/widgets/jdownloader/proxy.js @@ -176,11 +176,9 @@ export default async function jdownloaderProxyHandler(req, res) { let totalSpeed = 0; packageStatus.forEach(file => { totalBytes += file.bytesTotal; - if (file.finished !== true) { - totalLoaded += file.bytesLoaded; - if (file.speed) { - totalSpeed += file.speed; - } + totalLoaded += file.bytesLoaded; + if (file.finished !== true && file.speed) { + totalSpeed += file.speed; } });