1
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-03-09 12:50:23 -05:00
This commit is contained in:
8street 2025-03-09 04:23:03 +05:30 committed by GitHub
commit 6a23775e77
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -62,6 +62,10 @@ class DownloadContext(dict):
ctx.is_resume = ctx.resume_len > 0 ctx.is_resume = ctx.resume_len > 0
ctx.start_len = 0
if ctx.is_resume:
ctx.start_len = ctx.resume_len
class SucceedDownload(Exception): class SucceedDownload(Exception):
pass pass
@ -300,7 +304,7 @@ def retry(e):
if ctx.data_len is None: if ctx.data_len is None:
eta = None eta = None
else: else:
eta = self.calc_eta(start, time.time(), ctx.data_len - ctx.resume_len, byte_counter - ctx.resume_len) eta = self.calc_eta(ctx.start_time, time.time(), ctx.data_len - ctx.start_len, byte_counter - ctx.start_len)
self._hook_progress({ self._hook_progress({
'status': 'downloading', 'status': 'downloading',