Skip to content

Commit

Permalink
Update display_progress.py
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxxRider authored Sep 24, 2020
1 parent dd9eadc commit 879d9d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tobrot/helper_funcs/display_progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ async def progress_for_pyrogram(
estimated_total_time = elapsed_time + time_to_completion

elapsed_time = TimeFormatter(milliseconds=elapsed_time)
estimated_total_time = TimeFormatter(milliseconds=estimated_total_time)
time_to_completion = TimeFormatter(milliseconds=time_to_completion)

progress = "[{0}{1}] \n<b>🔹Percentage:</b> <code>〘 {2}% 〙</code>\n".format(
''.join([FINISHED_PROGRESS_STR for i in range(math.floor(percentage / 5))]),
Expand All @@ -48,7 +48,7 @@ async def progress_for_pyrogram(
humanbytes(total),
humanbytes(speed),
# elapsed_time if elapsed_time != '' else "0 s",
estimated_total_time if estimated_total_time != '' else "0 s"
time_to_completion if time_to_completion != '' else "0 s"
)
try:
if not message.photo:
Expand Down Expand Up @@ -76,7 +76,7 @@ def humanbytes(size):
return ""
power = 2**10
n = 0
Dic_powerN = {0: ' ', 1: 'Ki', 2: 'Mi', 3: 'Gi', 4: 'Ti'}
Dic_powerN = {0: ' ', 1: 'K', 2: 'M', 3: 'G', 4: 'Ti'}
while size > power:
size /= power
n += 1
Expand Down

0 comments on commit 879d9d4

Please sign in to comment.