mirror of
https://github.com/l1ving/youtube-dl
synced 2026-06-05 06:06:34 +08:00
Call _hook_progress() instead of faking it
Since now report_progress() handles lack of a file size.
This commit is contained in:
@@ -28,9 +28,7 @@ class ExternalFD(FileDownloader):
|
||||
retval = self._call_downloader(tmpfilename, info_dict)
|
||||
if retval == 0:
|
||||
if filename == '-':
|
||||
# xxx report_progress() expects total_bytes to be set or it throws a KeyError, so
|
||||
# we can't just call: self._hook_progress({'status': 'finished'})
|
||||
self.to_screen('[download] Download completed')
|
||||
self._hook_progress({'status': 'finished'})
|
||||
else:
|
||||
fsize = os.path.getsize(encodeFilename(tmpfilename))
|
||||
self.to_screen('\r[%s] Downloaded %s bytes' % (self.get_basename(), fsize))
|
||||
|
||||
Reference in New Issue
Block a user