mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-07 16:36:53 +08:00
refactor(helper): 将DirectoryHelper、RuleHelper和TorrentHelper方法改为静态方法
- 移除不必要的实例化操作,直接使用类方法
This commit is contained in:
@@ -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 = []
|
||||
|
||||
Reference in New Issue
Block a user