_hook_progress() with 'filename' when writing to stdout

This commit is contained in:
John Hawkinson 2016-10-15 05:11:53 -04:00
parent f1f0b34a4e
commit 356672c250

View File

@ -28,7 +28,10 @@ class ExternalFD(FileDownloader):
retval = self._call_downloader(tmpfilename, info_dict)
if retval == 0:
if filename == '-':
self._hook_progress({'status': 'finished'})
self._hook_progress({
'filename': filename,
'status': 'finished',
})
else:
fsize = os.path.getsize(encodeFilename(tmpfilename))
self.to_screen('\r[%s] Downloaded %s bytes' % (self.get_basename(), fsize))