mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 23:47:41 +08:00
修复 多下载器返回相同种子造成的重复整理
This commit is contained in:
@@ -968,11 +968,14 @@ class TransferChain(ChainBase, ConfigReloadMixin, metaclass=Singleton):
|
|||||||
|
|
||||||
# 从下载器获取种子列表
|
# 从下载器获取种子列表
|
||||||
if torrents_list := self.list_torrents(status=TorrentStatus.TRANSFER):
|
if torrents_list := self.list_torrents(status=TorrentStatus.TRANSFER):
|
||||||
|
seen = set()
|
||||||
existing_hashes = self.jobview.get_all_torrent_hashes()
|
existing_hashes = self.jobview.get_all_torrent_hashes()
|
||||||
torrents = [
|
torrents = [
|
||||||
torrent
|
torrent
|
||||||
for torrent in torrents_list
|
for torrent in torrents_list
|
||||||
if torrent.hash not in existing_hashes
|
if (h := torrent.hash) not in existing_hashes
|
||||||
|
# 排除多下载器返回的重复种子
|
||||||
|
and (h not in seen and (seen.add(h) or True))
|
||||||
]
|
]
|
||||||
else:
|
else:
|
||||||
torrents = []
|
torrents = []
|
||||||
|
|||||||
Reference in New Issue
Block a user