mirror of
https://github.com/soimort/you-get.git
synced 2025-02-11 12:42:29 +03:00
[common]show 99.9% instead of 100.0% when not complete but near
This commit is contained in:
parent
84624d8a8b
commit
9e7a84ffbe
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user