From 1f6dc93ea3435fcbeeed57ea5b961c0cb6280e64 Mon Sep 17 00:00:00 2001 From: Attente <19653207+wikrin@users.noreply.github.com> Date: Wed, 6 Aug 2025 23:13:01 +0800 Subject: [PATCH] =?UTF-8?q?fix(transfer):=20=E4=BF=AE=E5=A4=8D=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=E7=9B=91=E6=8E=A7=E4=B8=8B=E6=84=8F=E5=A4=96=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E6=9C=AA=E5=AE=8C=E6=88=90=E7=A7=8D=E5=AD=90=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 如果种子尚未下载完成,则直接返回 False --- app/chain/transfer.py | 4 ++++ app/modules/transmission/__init__.py | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/chain/transfer.py b/app/chain/transfer.py index 968d4c11..80753879 100755 --- a/app/chain/transfer.py +++ b/app/chain/transfer.py @@ -1450,6 +1450,10 @@ class TransferChain(ChainBase, metaclass=Singleton): if not torrents: return False + # 未下载完成 + if torrents[0].progress < 100: + return False + # 获取种子文件列表 torrent_files = self.torrent_files(download_hash, downloader) if not torrent_files: diff --git a/app/modules/transmission/__init__.py b/app/modules/transmission/__init__.py index 7b5ef44c..48d43e39 100644 --- a/app/modules/transmission/__init__.py +++ b/app/modules/transmission/__init__.py @@ -253,7 +253,8 @@ class TransmissionModule(_ModuleBase, _DownloaderBase[Transmission]): path=Path(torrent.download_dir) / torrent.name, hash=torrent.hashString, size=torrent.total_size, - tags=",".join(torrent.labels or []) + tags=",".join(torrent.labels or []), + progress=torrent.progress )) finally: torrents.clear()