From 71b640cc5b2f15a6913a720b589bdd3ed318c154 Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Mon, 15 Dec 2014 01:26:18 +0100 Subject: [YoutubeDL] Add declarative version of progress hooks --- youtube_dl/downloader/common.py | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'youtube_dl/downloader/common.py') diff --git a/youtube_dl/downloader/common.py b/youtube_dl/downloader/common.py index 8181bca09..d3e0b0110 100644 --- a/youtube_dl/downloader/common.py +++ b/youtube_dl/downloader/common.py @@ -305,19 +305,6 @@ class FileDownloader(object): ph(status) def add_progress_hook(self, ph): - """ ph gets called on download progress, with a dictionary with the entries - * filename: The final filename - * status: One of "downloading" and "finished" - - It can also have some of the following entries: - - * downloaded_bytes: Bytes on disks - * total_bytes: Total bytes, None if unknown - * tmpfilename: The filename we're currently writing to - * eta: The estimated time in seconds, None if unknown - * speed: The download speed in bytes/second, None if unknown - - Hooks are guaranteed to be called at least once (with status "finished") - if the download is successful. - """ + # See YoutubeDl.py (search for progress_hooks) for a description of + # this interface self._progress_hooks.append(ph) -- cgit v1.2.3