diff --git a/app/chain/subscribe.py b/app/chain/subscribe.py index 9001ca6e..44d9e48f 100644 --- a/app/chain/subscribe.py +++ b/app/chain/subscribe.py @@ -451,9 +451,9 @@ class SubscribeChain(ChainBase): self._rlock.release() logger.debug(f"search Lock released at {datetime.now()}") - # 如果不是大内存模式,进行垃圾回收 - if not settings.BIG_MEMORY_MODE: - gc.collect() + # 如果不是大内存模式,进行垃圾回收 + if not settings.BIG_MEMORY_MODE: + gc.collect() def update_subscribe_priority(self, subscribe: Subscribe, meta: MetaBase, mediainfo: MediaInfo, downloads: Optional[List[Context]]): diff --git a/app/chain/torrents.py b/app/chain/torrents.py index 411c3714..2fb894eb 100644 --- a/app/chain/torrents.py +++ b/app/chain/torrents.py @@ -179,7 +179,15 @@ class TorrentsChain(ChainBase): domains.append(domain) if stype == "spider": # 刷新首页种子 - torrents: List[TorrentInfo] = self.browse(domain=domain) + torrents: List[TorrentInfo] = [] + # 读取第0页和第1页 + for page in range(2): + page_torrents = self.browse(domain=domain, page=page) + if page_torrents: + torrents.extend(page_torrents) + else: + # 如果某一页没有数据,说明已经到最后一页,停止获取 + break else: # 刷新RSS种子 torrents: List[TorrentInfo] = self.rss(domain=domain)