修复 多下载器返回相同种子造成的重复整理

This commit is contained in:
景大侠
2026-01-24 01:41:48 +08:00
parent fa9f604af9
commit 1532014067

View File

@@ -968,11 +968,14 @@ class TransferChain(ChainBase, ConfigReloadMixin, metaclass=Singleton):
# 从下载器获取种子列表
if torrents_list := self.list_torrents(status=TorrentStatus.TRANSFER):
seen = set()
existing_hashes = self.jobview.get_all_torrent_hashes()
torrents = [
torrent
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:
torrents = []