From 9e7a84ffbeec63a8a3216043adcdef07d2480aaa Mon Sep 17 00:00:00 2001 From: MaxwellGoblin Date: Sun, 23 Jul 2017 09:29:29 +0800 Subject: [PATCH] [common]show 99.9% instead of 100.0% when not complete but near --- src/you_get/common.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/you_get/common.py b/src/you_get/common.py index 7527b881..925e414a 100755 --- a/src/you_get/common.py +++ b/src/you_get/common.py @@ -656,6 +656,9 @@ class SimpleProgressBar: percent_str = '100' else: percent = math.floor(self.received * 100 / self.total_size) +# near but not complete - kick it to 99.9 + if percent_str == '100.0': + percent_str = '99.9' dots = bar_size * percent // 100 plus = percent - dots // bar_size * 100 if plus > 0.8: