1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-10-04 15:34:58 -04:00

[downloader] Pass info_dict to progress_hooks

This commit is contained in:
pukkandan
2021-07-21 22:58:43 +05:30
parent 29b208f6f9
commit 3ba7740dd8
13 changed files with 36 additions and 28 deletions

View File

@@ -177,7 +177,7 @@ class HttpFD(FileDownloader):
'status': 'finished',
'downloaded_bytes': ctx.resume_len,
'total_bytes': ctx.resume_len,
})
}, info_dict)
raise SucceedDownload()
else:
# The length does not match, we start the download over
@@ -310,7 +310,7 @@ class HttpFD(FileDownloader):
'eta': eta,
'speed': speed,
'elapsed': now - ctx.start_time,
})
}, info_dict)
if data_len is not None and byte_counter == data_len:
break
@@ -357,7 +357,7 @@ class HttpFD(FileDownloader):
'filename': ctx.filename,
'status': 'finished',
'elapsed': time.time() - ctx.start_time,
})
}, info_dict)
return True