From 29f5617e786a42b65d280bcb32d366fcdc1cb366 Mon Sep 17 00:00:00 2001 From: KotaHv <92137267+KotaHv@users.noreply.github.com> Date: Tue, 11 Jun 2024 01:15:12 +0800 Subject: [PATCH] fix: changed the global RSS parser filter requires program restart to take effect --- backend/src/module/network/request_contents.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/src/module/network/request_contents.py b/backend/src/module/network/request_contents.py index 05abca02..a5705066 100644 --- a/backend/src/module/network/request_contents.py +++ b/backend/src/module/network/request_contents.py @@ -15,7 +15,7 @@ class RequestContent(RequestURL): def get_torrents( self, _url: str, - _filter: str = "|".join(settings.rss_parser.filter), + _filter: str = None, limit: int = None, retry: int = 3, ) -> list[Torrent]: @@ -23,6 +23,8 @@ class RequestContent(RequestURL): if soup: torrent_titles, torrent_urls, torrent_homepage = rss_parser(soup) torrents: list[Torrent] = [] + if _filter is None: + _filter = "|".join(settings.rss_parser.filter) for _title, torrent_url, homepage in zip( torrent_titles, torrent_urls, torrent_homepage ):