aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/downloader/common.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-12-15 01:26:18 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2014-12-15 01:26:20 +0100
commit71b640cc5b2f15a6913a720b589bdd3ed318c154 (patch)
tree2fae1a597334a878e0da92f7622d1e81351e3b10 /youtube_dl/downloader/common.py
parent4f026fafbc6cc4eac10a5f89b9375b44d64083c9 (diff)
[YoutubeDL] Add declarative version of progress hooks
Diffstat (limited to 'youtube_dl/downloader/common.py')
-rw-r--r--youtube_dl/downloader/common.py17
1 files changed, 2 insertions, 15 deletions
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)