mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-24 00:58:19 +00:00
proper prefix for size - ticket #178
This commit is contained in:
parent
72e34d4d87
commit
07a73f6039
@ -54,12 +54,12 @@ def get_eta(size, done, rate):
|
||||
def fsize(fsize_b):
|
||||
fsize_kb = float (fsize_b / 1024.0)
|
||||
if fsize_kb < 1000:
|
||||
return '%.1f KB'%fsize_kb
|
||||
return '%.1f KiB'%fsize_kb
|
||||
fsize_mb = float (fsize_kb / 1024.0)
|
||||
if fsize_mb < 1000:
|
||||
return '%.1f MB'%fsize_mb
|
||||
return '%.1f MiB'%fsize_mb
|
||||
fsize_gb = float (fsize_mb / 1024.0)
|
||||
return '%.1f GB'%fsize_gb
|
||||
return '%.1f GiB'%fsize_gb
|
||||
|
||||
# Returns a formatted string representing a percentage
|
||||
def fpcnt(dec):
|
||||
|
Loading…
x
Reference in New Issue
Block a user