mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-08 06:00:51 -07:00
Divide file size by 2^10 but display SI units
This commit is contained in:
parent
47610323b0
commit
ae9df92d28
2 changed files with 4 additions and 2 deletions
|
@ -1034,7 +1034,8 @@ def humanFileSize(bytes, si=True):
|
|||
else:
|
||||
return bytes
|
||||
|
||||
thresh = 1000 if si else 1024
|
||||
#thresh = 1000 if si else 1024
|
||||
thresh = 1024 # Always divide by 2^10 but display SI units
|
||||
if bytes < thresh:
|
||||
return str(bytes) + ' B'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue