Merge pull request #449 from Lunaticzy/main

This commit is contained in:
jxxghp
2024-08-17 09:59:02 +08:00
committed by GitHub
2 changed files with 5 additions and 1 deletions

View File

@@ -335,6 +335,7 @@
"author": "jxxghp",
"level": 2,
"history": {
"v1.5":"修复在转移时只保留了第一个tracker导致红种问题。此修复确保保留所有的tracker以提高在不同网络条件下的可达性。",
"v1.4": "支持自动删除源下载器在目的下载器中存在的种子"
}
},

View File

@@ -27,7 +27,7 @@ class TorrentTransfer(_PluginBase):
# 插件图标
plugin_icon = "seed.png"
# 插件版本
plugin_version = "1.4"
plugin_version = "1.5"
# 插件作者
plugin_author = "jxxghp"
# 作者主页
@@ -724,6 +724,9 @@ class TorrentTransfer(_PluginBase):
and fastresume_trackers[0]:
# 重新赋值
torrent_main['announce'] = fastresume_trackers[0][0]
# 保留其他tracker避免单一tracker无法连接
if len(fastresume_trackers) > 1 or len(fastresume_trackers[0]) > 1:
torrent_main['announce-list'] = fastresume_trackers
# 替换种子文件路径
torrent_file = settings.TEMP_PATH / f"{torrent_item.get('hash')}.torrent"
# 编码并保存到临时文件