Change filesize to be in decimal units in DownloadColumn, progress.py

This commit is contained in:
amartya-dev 2020-10-04 02:34:19 +05:30
parent 52cdd9a796
commit 37302595a7
1 changed files with 2 additions and 2 deletions

View File

@ -300,8 +300,8 @@ class DownloadColumn(ProgressColumn):
total = int(task.total)
unit, suffix = filesize.pick_unit_and_suffix(
total,
["bytes", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"],
1024,
["bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"],
1000,
)
completed_ratio = completed / unit
total_ratio = total / unit