From bece6ef5de7158610a66ad175cdb0d29bdf20aa9 Mon Sep 17 00:00:00 2001 From: derrod Date: Wed, 16 Dec 2020 12:14:31 +0100 Subject: [PATCH] [downloader] Fix skipping unneeded chunks This was erroneously removed in daeee2e --- legendary/downloader/manager.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/legendary/downloader/manager.py b/legendary/downloader/manager.py index b8613f5..3434bc8 100644 --- a/legendary/downloader/manager.py +++ b/legendary/downloader/manager.py @@ -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