fix: cannot match title when title parser item has regex item.

This commit is contained in:
EstrellaXD
2023-07-15 16:15:27 +08:00
parent 94cc22a889
commit 766bcb13a2

View File

@@ -1,4 +1,5 @@
import logging
import re
from .path import TorrentPath
@@ -70,9 +71,10 @@ class DownloadClient(TorrentPath):
def set_rule(self, data: BangumiData):
data.rule_name = self._rule_name(data)
data.save_path = self._gen_save_path(data)
raw_title = re.escape(data.title_raw)
rule = {
"enable": True,
"mustContain": data.title_raw,
"mustContain": raw_title,
"mustNotContain": "|".join(data.filter),
"useRegex": True,
"episodeFilter": "",