about summary refs log tree commit diff
diff options
context:
space:
mode:
authordirkf <fieldhouse@gmx.net>2023-09-24 22:00:13 +0100
committerdirkf <fieldhouse@gmx.net>2023-09-24 22:07:47 +0100
commit00ef748cc0e35ee60efd0f7a00e373ab8d1af86b (patch)
tree7802240515be489ca175c0f02924a2e716c867ad
parent66ab0814c4baa2dc79c2dd5287bc0ad61a37c5b9 (diff)
downloadyoutube-dl-00ef748cc0e35ee60efd0f7a00e373ab8d1af86b.tar.gz
youtube-dl-00ef748cc0e35ee60efd0f7a00e373ab8d1af86b.tar.xz
youtube-dl-00ef748cc0e35ee60efd0f7a00e373ab8d1af86b.zip
[downloader] Fix baa6c5e: show ETA of http download as ETA instead of total d/l time
-rw-r--r--youtube_dl/downloader/common.py2
-rw-r--r--youtube_dl/downloader/http.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/downloader/common.py b/youtube_dl/downloader/common.py
index afb4ee33d..91e691776 100644
--- a/youtube_dl/downloader/common.py
+++ b/youtube_dl/downloader/common.py
@@ -96,7 +96,7 @@ class FileDownloader(object):
                 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:
diff --git a/youtube_dl/downloader/http.py b/youtube_dl/downloader/http.py
index 28a49b9e8..3cad87420 100644
--- a/youtube_dl/downloader/http.py
+++ b/youtube_dl/downloader/http.py
@@ -294,7 +294,7 @@ class HttpFD(FileDownloader):
 
                 # 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',