[downloader/http] Add missing fields for _hook_progress call
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Wed, 4 Mar 2015 11:14:38 +0000 (12:14 +0100)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Wed, 4 Mar 2015 11:14:38 +0000 (12:14 +0100)
It would fail if you run 'youtube-dl --no-part URL' a second time when the file has already been downloaded.

(Reported in Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=1195779)

youtube_dl/downloader/http.py

index 5e99827994d80107a0e63acdc6280970b91df5bc..4047d7167478b34c9cacc79dcbbfeee1bb31d317 100644 (file)
@@ -92,6 +92,8 @@ class HttpFD(FileDownloader):
                             self._hook_progress({
                                 'filename': filename,
                                 'status': 'finished',
+                                'downloaded_bytes': resume_len,
+                                'total_bytes': resume_len,
                             })
                             return True
                         else: