1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-03-13 20:17:15 +08:00

mention approximation

This commit is contained in:
xantares 2015-02-17 20:13:52 +01:00
parent 6c5b7e5885
commit 1270808b7c

View File

@ -333,15 +333,16 @@ class F4mFD(FileDownloader):
status.get('speed'), eta)
# report totals to actual hooks
toplevel_status = {'status': 'downloading', 'filename': filename, 'tmpfilename': tmpfilename}
toplevel_status = {'status': 'downloading', 'filename': filename,
'tmpfilename': tmpfilename, 'eta': eta}
toplevel_status['downloaded_bytes'] = state['downloaded_bytes']
total_bytes = 0
if progress > 0:
# subject to rounding error
total_bytes = int((100.0 * state['downloaded_bytes']) / progress)
toplevel_status['total_bytes'] = total_bytes
if 'speed' in status:
toplevel_status['speed'] = status['speed']
toplevel_status['eta'] = eta
self._hook_progress(toplevel_status)
http_dl.add_progress_hook(frag_progress_hook)