Skip to content

Commit

Permalink
[downloader] Fix baa6c5e: show ETA of http download as ETA instead of…
Browse files Browse the repository at this point in the history
… total d/l time
  • Loading branch information
dirkf committed Sep 24, 2023
1 parent 66ab081 commit 00ef748
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion youtube_dl/downloader/common.py
Expand Up @@ -96,7 +96,7 @@ def calc_eta(cls, start_or_rate, now_or_remaining, *args):
return None
return int(float(remaining) / rate)
start, now = (start_or_rate, now_or_remaining)
total, current = args
total, current = args[:2]
if total is None:
return None
if now is None:
Expand Down
2 changes: 1 addition & 1 deletion youtube_dl/downloader/http.py
Expand Up @@ -294,7 +294,7 @@ def retry(e):

# Progress message
speed = self.calc_speed(start, now, byte_counter - ctx.resume_len)
eta = self.calc_eta(speed, ctx.data_len and (ctx.data_len - ctx.resume_len))
eta = self.calc_eta(speed, ctx.data_len and (ctx.data_len - byte_counter))

self._hook_progress({
'status': 'downloading',
Expand Down

0 comments on commit 00ef748

Please sign in to comment.