Skip to content

Commit

Permalink
[build] Regex matching fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Feramance committed Oct 9, 2023
1 parent 5e9e900 commit 8b96b45
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions qBitrr/arss.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,19 +285,16 @@ def __init__(
self.file_name_exclusion_regex_re = re.compile(
"|".join(self.file_name_exclusion_regex), re.DOTALL
)
self.file_extension_allowlist = re.compile(
"|".join(self.file_extension_allowlist), re.DOTALL
)
else:
self.folder_exclusion_regex_re = re.compile(
"|".join(self.folder_exclusion_regex), re.IGNORECASE | re.DOTALL
)
self.file_name_exclusion_regex_re = re.compile(
"|".join(self.file_name_exclusion_regex), re.IGNORECASE | re.DOTALL
)
self.file_extension_allowlist = re.compile(
"|".join(self.file_extension_allowlist), re.DOTALL
)
self.file_extension_allowlist = re.compile(
"|".join(self.file_extension_allowlist), re.DOTALL
)
self.client = client_cls(host_url=self.uri, api_key=self.apikey)
if isinstance(self.client, SonarrAPI):
self.type = "sonarr"
Expand Down Expand Up @@ -2939,7 +2936,7 @@ def _process_single_torrent_process_files(
)
_remove_files.add(file.id)
total -= 1
elif self.file_extension_allowlist and (
elif self.file_extension_allowlist and not (
(match := self.file_extension_allowlist.search(file_path.suffix)) and match.group()
):
self.logger.debug(
Expand Down

0 comments on commit 8b96b45

Please sign in to comment.