mirror of
https://github.com/derrod/legendary.git
synced 2026-10-25 10:46:01 +00:00
Read exclusion prefixes from file
This commit is contained in:
parent
42f6bdeadd
commit
31ba62a7a0
|
|
@ -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'))
|
||||
|
|
|
|||
Loading…
Reference in a new issue