fix: re error in rss engine. Close #484

This commit is contained in:
EstrellaXD
2023-10-03 21:53:34 +08:00
parent 7662f1d024
commit f82ea902e6

View File

@@ -102,6 +102,8 @@ class RSSEngine(Database):
def match_torrent(self, torrent: Torrent) -> Optional[Bangumi]:
matched: Bangumi = self.bangumi.match_torrent(torrent.name)
if matched:
if matched.filter == "":
return matched
_filter = matched.filter.replace(",", "|")
if not re.search(_filter, torrent.name, re.IGNORECASE):
torrent.bangumi_id = matched.id