Call _hook_progress() instead of faking it
Since now report_progress() handles lack of a file size.
This commit is contained in:
parent
5a1e040b8e
commit
f1f0b34a4e
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user