From 662972a116be78ff5917965d8611d0d90caa4853 Mon Sep 17 00:00:00 2001 From: xantares Date: Thu, 5 Feb 2015 08:29:51 +0100 Subject: [PATCH] [f4m] call progress hook --- youtube_dl/downloader/f4m.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/youtube_dl/downloader/f4m.py b/youtube_dl/downloader/f4m.py index 0e7a1c200..82c6ceec0 100644 --- a/youtube_dl/downloader/f4m.py +++ b/youtube_dl/downloader/f4m.py @@ -331,6 +331,14 @@ class F4mFD(FileDownloader): eta = self.calc_eta(start, time.time(), estimated_size, byte_counter) self.report_progress(progress, format_bytes(estimated_size), status.get('speed'), eta) + + # report totals to actual hooks + status['status'] = 'downloading' + #status['downloaded_bytes'] = state['downloaded_bytes'] ? + #status['total_bytes'] = ? + for hook in self._progress_hooks: + hook(status) + http_dl.add_progress_hook(frag_progress_hook) frags_filenames = []