mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-14 03:17:16 +08:00
no need to check state['downloaded_bytes'] > 0
This commit is contained in:
parent
f457fb5f01
commit
d837a0db41
@ -335,8 +335,10 @@ class F4mFD(FileDownloader):
|
||||
# report totals to actual hooks
|
||||
toplevel_status = {'status': 'downloading', 'filename': filename, 'tmpfilename': tmpfilename}
|
||||
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)
|
||||
total_bytes = 0
|
||||
if progress > 0:
|
||||
total_bytes = int((100.0 * state['downloaded_bytes']) / progress)
|
||||
toplevel_status['total_bytes'] = total_bytes
|
||||
if 'speed' in status:
|
||||
toplevel_status['speed'] = status['speed']
|
||||
if 'eta' in status:
|
||||
|
Loading…
x
Reference in New Issue
Block a user