From 2d53999c8e9a7730e51aa7a0cb29b55412b76321 Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Tue, 4 Jun 2019 13:23:48 +0100 Subject: [PATCH] only show download speed if downloading --- .../main/groovy/com/muwire/core/download/Downloader.groovy | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/main/groovy/com/muwire/core/download/Downloader.groovy b/core/src/main/groovy/com/muwire/core/download/Downloader.groovy index 1802f872..3a823f22 100644 --- a/core/src/main/groovy/com/muwire/core/download/Downloader.groovy +++ b/core/src/main/groovy/com/muwire/core/download/Downloader.groovy @@ -102,8 +102,10 @@ public class Downloader { public int speed() { int total = 0 - activeWorkers.values().each { - total += it.speed() + if (getCurrentState() == DownloadState.DOWNLOADING) { + activeWorkers.values().each { + total += it.speed() + } } total }