Use SI megabyte (MB) rather than Mebibyte (MiB)

This commit is contained in:
Et0h 2014-10-25 13:16:21 +01:00
parent 468c7f665d
commit b672c21bfb
2 changed files with 5 additions and 5 deletions

View File

@ -194,7 +194,7 @@ en = {
"setoffset-msgbox-label" : "Set offset",
"offsetinfo-msgbox-label" : "Offset (see http://syncplay.pl/guide/ for usage instructions):",
"mebibyte-suffix" : " MiB",
"megabyte-suffix" : " MB",
# Tooltips

View File

@ -97,12 +97,12 @@ def formatSize (bytes, precise=False):
if bytes == 0: # E.g. when file size privacy is enabled
return "???"
try:
mebibytes = int(bytes) / 1048576.0
megabytes = int(bytes) / 1000000.0
if precise:
mebibytes = round(mebibytes, 1)
megabytes = round(megabytes, 1)
else:
mebibytes = int(mebibytes)
return str(mebibytes) + getMessage("mebibyte-suffix")
megabytes = int(megabytes)
return str(megabytes) + getMessage("megabyte-suffix")
except: # E.g. when filesize is hashed
return "???"