mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 23:47:41 +08:00
更新 subscribe.py
This commit is contained in:
@@ -368,7 +368,7 @@ class SubscribeChain(ChainBase):
|
|||||||
domain = StringUtils.get_url_domain(indexer.get("domain"))
|
domain = StringUtils.get_url_domain(indexer.get("domain"))
|
||||||
torrents: List[TorrentInfo] = self.refresh_torrents(site=indexer)
|
torrents: List[TorrentInfo] = self.refresh_torrents(site=indexer)
|
||||||
# 按pubdate降序排列
|
# 按pubdate降序排列
|
||||||
torrents.sort(key=lambda x: x.pubdate, reverse=True)
|
torrents.sort(key=lambda x: x.pubdate or '', reverse=True)
|
||||||
# 取前N条
|
# 取前N条
|
||||||
torrents = torrents[:settings.CACHE_CONF.get('refresh')]
|
torrents = torrents[:settings.CACHE_CONF.get('refresh')]
|
||||||
if torrents:
|
if torrents:
|
||||||
|
|||||||
Reference in New Issue
Block a user