Forráskód Böngészése

[downloader/http] Add missing fields for _hook_progress call

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)
Jaime Marquínez Ferrándiz 10 éve
szülő
commit
f28fe66970
1 módosított fájl, 2 hozzáadás és 0 törlés
  1. 2 0
      youtube_dl/downloader/http.py

+ 2 - 0
youtube_dl/downloader/http.py

@@ -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: