mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-18 08:08:46 +00:00
Fix size units to be more accurate
This commit is contained in:
parent
73b3ff8a0f
commit
bba9c1a54f
2 changed files with 5 additions and 4 deletions
|
@ -9,6 +9,7 @@ Deluge 0.9.07 - "1.0.0_RC7" (In Development)
|
||||||
* Improve performance of initial torrent list load
|
* Improve performance of initial torrent list load
|
||||||
* Fix hiding the bottom pane when disabling all the tabs
|
* Fix hiding the bottom pane when disabling all the tabs
|
||||||
* Fix not showing new torrents if you don't use the All label first
|
* Fix not showing new torrents if you don't use the All label first
|
||||||
|
* Fix size units to be more accurate
|
||||||
|
|
||||||
Windows:
|
Windows:
|
||||||
* Fix Vista slowness issue
|
* Fix Vista slowness issue
|
||||||
|
|
|
@ -262,13 +262,13 @@ def show_other_dialog(string, default=None):
|
||||||
def fsize(fsize_b):
|
def fsize(fsize_b):
|
||||||
"""Returns formatted string describing filesize
|
"""Returns formatted string describing filesize
|
||||||
fsize_b should be in bytes
|
fsize_b should be in bytes
|
||||||
Returned value will be in either KB, MB, or GB
|
Returned value will be in either KiB, MiB, or GiB
|
||||||
"""
|
"""
|
||||||
fsize_kb = fsize_b / 1024.0
|
fsize_kb = fsize_b / 1024.0
|
||||||
if fsize_kb < 1000:
|
if fsize_kb < 1024:
|
||||||
return "%.1f KiB" % fsize_kb
|
return "%.1f KiB" % fsize_kb
|
||||||
fsize_mb = fsize_kb / 1024.0
|
fsize_mb = fsize_kb / 1024.0
|
||||||
if fsize_mb < 1000:
|
if fsize_mb < 1024:
|
||||||
return "%.1f MiB" % fsize_mb
|
return "%.1f MiB" % fsize_mb
|
||||||
fsize_gb = fsize_mb / 1024.0
|
fsize_gb = fsize_mb / 1024.0
|
||||||
return "%.1f GiB" % fsize_gb
|
return "%.1f GiB" % fsize_gb
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue