[downloader] Fix skipping unneeded chunks

This was erroneously removed in daeee2e
This commit is contained in:
derrod 2020-12-16 12:14:31 +01:00
parent e710bb893f
commit bece6ef5de

View file

@ -291,7 +291,10 @@ class DLManager(Process):
# runtime cache requirement by simulating adding/removing from cache during download.
self.log.debug('Creating filetasks and chunktasks...')
for current_file in fmlist:
if not current_file.chunk_parts:
# skip unchanged and empty files
if current_file.filename in mc.unchanged:
continue
elif not current_file.chunk_parts:
self.tasks.append(FileTask(current_file.filename, empty=True))
continue