refactor(helper): 将DirectoryHelper、RuleHelper和TorrentHelper方法改为静态方法

- 移除不必要的实例化操作,直接使用类方法
This commit is contained in:
Attente
2026-03-13 19:50:10 +08:00
parent e09cfc6704
commit b89825525a
20 changed files with 81 additions and 79 deletions
+2 -1
View File
@@ -210,11 +210,12 @@ class TorrentsChain(ChainBase):
# 读取缓存
torrents_cache = self.get_torrents()
torrenthelper = TorrentHelper()
# 缓存过滤掉无效种子
for _domain, _torrents in torrents_cache.items():
torrents_cache[_domain] = [_torrent for _torrent in _torrents
if not TorrentHelper().is_invalid(_torrent.torrent_info.enclosure)]
if not torrenthelper.is_invalid(_torrent.torrent_info.enclosure)]
# 需要刷新的站点domain
domains = []