From 1640a47d6a236795ee3f04b6aa60902482395f3b Mon Sep 17 00:00:00 2001 From: derrod Date: Tue, 8 Dec 2020 06:12:47 +0100 Subject: [PATCH] [downloader] Correctly support empty install tag --- legendary/downloader/manager.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/legendary/downloader/manager.py b/legendary/downloader/manager.py index 294e17dd..44fb6469 100644 --- a/legendary/downloader/manager.py +++ b/legendary/downloader/manager.py @@ -139,12 +139,13 @@ def run_analysis(self, manifest: Manifest, old_manifest: Manifest = None, # Not entirely sure what install tags are used for, only some titles have them. # Let's add it for testing anyway. - if file_install_tag: + if file_install_tag is not None: if isinstance(file_install_tag, str): file_install_tag = [file_install_tag] files_to_skip = set(i.filename for i in manifest.file_manifest_list.elements - if not any(fit in i.install_tags for fit in file_install_tag)) + if not any((fit in i.install_tags) or (not fit and not i.install_tags) + for fit in file_install_tag)) self.log.info(f'Found {len(files_to_skip)} files to skip based on install tag.') mc.added -= files_to_skip mc.changed -= files_to_skip