Skip to content

Commit

Permalink
[downloader] Correctly support empty install tag
Browse files Browse the repository at this point in the history
  • Loading branch information
derrod committed Dec 8, 2020
1 parent 5db6d9c commit 1640a47
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions legendary/downloader/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1640a47

Please sign in to comment.