Skip to content
This repository has been archived by the owner on Aug 23, 2024. It is now read-only.

Commit

Permalink
Minor formatting changes, improved comments
Browse files Browse the repository at this point in the history
  • Loading branch information
CoffeeStraw committed Apr 13, 2021
1 parent 1dc97f6 commit 682b010
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,17 @@ def update(self, line):
if progress:
progress = progress.groups()

# Update filesize
# Update filesize (in MB if possible)
if progress[1] == "kB":
self.tqdm_pbar.desc = f"Size: {float(progress[0]) / 1024:.2f} MB"
else:
self.tqdm_pbar.desc = f"Size: {progress[0]} {progress[1]}"
self.tqdm_pbar.desc = f"Size: {float(progress[0]):.2f} {progress[1]}"

# Update speed
# Update speed (in MB/s if possible)
if progress[6] == "kbits/s":
self.tqdm_pbar.unit = f"{float(progress[5]) / 1024:.2f} mbits/s"
self.tqdm_pbar.unit = f"{float(progress[5]) / 1024:.2f} MB/s"
else:
self.tqdm_pbar.unit = f"{progress[5]} {progress[6]}"
self.tqdm_pbar.unit = f"{float(progress[5]):.2f} {progress[6]}"

# Update progress bar
current_time = self.hms_to_s(progress[2:5])
Expand Down

0 comments on commit 682b010

Please sign in to comment.