From 1270808b7c9812411a7436b2fef192af1e16f738 Mon Sep 17 00:00:00 2001 From: xantares Date: Tue, 17 Feb 2015 20:13:52 +0100 Subject: [PATCH] mention approximation --- youtube_dl/downloader/f4m.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/youtube_dl/downloader/f4m.py b/youtube_dl/downloader/f4m.py index 12108d0f2..235d06b4b 100644 --- a/youtube_dl/downloader/f4m.py +++ b/youtube_dl/downloader/f4m.py @@ -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)