From 04f987cab84f054484b32768b7cb95beeb99f5fa Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Sun, 18 Dec 2022 21:59:50 -0500 Subject: [PATCH] [F] Fix download rate inverting --- .gitignore | 2 ++ hypy_utils/downloader.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 2515761..ddcadef 100644 --- a/.gitignore +++ b/.gitignore @@ -116,3 +116,5 @@ dmypy.json # Custom .idea HyPyUtils.iml +.DS_Store +._* diff --git a/hypy_utils/downloader.py b/hypy_utils/downloader.py index 5407c48..6f03a8a 100644 --- a/hypy_utils/downloader.py +++ b/hypy_utils/downloader.py @@ -33,7 +33,7 @@ def download_file(url: str, file: str | Path): with open(file, 'wb') as f: pbar = tqdm.tqdm(unit=" MB", ncols=term_len, - bar_format='{desc} {rate_fmt} {remaining} [{bar}] {percentage:.0f}%', ascii=' #', + bar_format='{desc} {rate_noinv_fmt} {remaining} [{bar}] {percentage:.0f}%', ascii=' #', desc=file.name[:bar_len].ljust(bar_len), **tqdm_args) for chunk in r.iter_content(chunk_size=chunk_size): if chunk: