From 31ba62a7a0f8089a4660ef7ade37fc052c8db987 Mon Sep 17 00:00:00 2001 From: sjp761 <171447425+sjp761@users.noreply.github.com> Date: Wed, 14 Oct 2026 11:35:07 -0500 Subject: [PATCH 1/2] Read exclusion prefixes from file --- legendary/core.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/legendary/core.py b/legendary/core.py index 6e27a52..0495f93 100644 --- a/legendary/core.py +++ b/legendary/core.py @@ -1654,6 +1654,17 @@ class LegendaryCore: if not max_workers: max_workers = self.lgd.config.getint('Legendary', 'max_workers', fallback=0) + try: + with open(exclude_file_path, 'r', encoding='utf-8') as f: + excludes = [line.strip().replace('\\', '/') for line in f if line.strip()] + + if file_exclude_filter is None: + file_exclude_filter = excludes + else: + file_exclude_filter += excludes + except (OSError, UnicodeError) as e: + self.log.debug('Could not load exclude file "%s", skipping: %s',exclude_file_path, e) + dlm = DLManager(install_path, base_url, manifest_secrets, resume_file=resume_file, status_q=status_q, max_shared_memory=max_shm * 1024 * 1024, max_workers=max_workers, dl_timeout=dl_timeout, bind_ip=bind_ip, case_insensitive=platform.startswith('Win')) From 40a9c6387264cd49a6cd98e7f528d586f631f1b1 Mon Sep 17 00:00:00 2001 From: sjp761 <171447425+sjp761@users.noreply.github.com> Date: Wed, 14 Oct 2026 11:49:42 -0500 Subject: [PATCH 2/2] Put back in accidentally erased line --- legendary/core.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/legendary/core.py b/legendary/core.py index 0495f93..d320201 100644 --- a/legendary/core.py +++ b/legendary/core.py @@ -1654,6 +1654,9 @@ class LegendaryCore: if not max_workers: max_workers = self.lgd.config.getint('Legendary', 'max_workers', fallback=0) + exclude_file_path = os.path.join(self.lgd.path, "exclude", game.app_name) + self.log.info(f'Using exclude file if it exists: {exclude_file_path}') + try: with open(exclude_file_path, 'r', encoding='utf-8') as f: excludes = [line.strip().replace('\\', '/') for line in f if line.strip()]