mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-13 23:57:25 +08:00
add speed & eta
This commit is contained in:
parent
cdf5734829
commit
f457fb5f01
@ -337,6 +337,10 @@ class F4mFD(FileDownloader):
|
||||
toplevel_status['downloaded_bytes'] = state['downloaded_bytes']
|
||||
if (state['downloaded_bytes'] > 0) and (progress > 0):
|
||||
toplevel_status['total_bytes'] = int(100.0 * state['downloaded_bytes'] / progress)
|
||||
if 'speed' in status:
|
||||
toplevel_status['speed'] = status['speed']
|
||||
if 'eta' in status:
|
||||
toplevel_status['eta'] = status['eta']
|
||||
for hook in self._progress_hooks:
|
||||
hook(toplevel_status)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user