[progess_hook] information for already downloaded files.

added a new key 'alreadyexists' with value 'True' to dictionary passed
to progress_hook.
This commit is contained in:
sum12 2016-11-18 12:49:43 +05:30
parent c131fc3372
commit a8073896fc
2 changed files with 2 additions and 0 deletions

View File

@ -338,6 +338,7 @@ class FileDownloader(object):
self.report_file_already_downloaded(filename)
self._hook_progress({
'filename': filename,
'alreadyexists':True,
'status': 'finished',
'total_bytes': os.path.getsize(encodeFilename(filename)),
})

View File

@ -106,6 +106,7 @@ class HttpFD(FileDownloader):
self.try_rename(tmpfilename, filename)
self._hook_progress({
'filename': filename,
'alreadyexists':True,
'status': 'finished',
'downloaded_bytes': resume_len,
'total_bytes': resume_len,