From 0e302d7959bd590b1129e4c4485ea212378b8a50 Mon Sep 17 00:00:00 2001 From: wumode Date: Mon, 12 May 2025 21:04:03 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20add=20'=E5=B7=B2=E6=95=B4=E7=90=86'?= =?UTF-8?q?=20tag=20to=20non-default=20downloader?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/chain/transfer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 app/chain/transfer.py diff --git a/app/chain/transfer.py b/app/chain/transfer.py old mode 100644 new mode 100755 index ba14ee1e..118b839f --- a/app/chain/transfer.py +++ b/app/chain/transfer.py @@ -860,7 +860,7 @@ class TransferChain(ChainBase, metaclass=Singleton): # 设置下载任务状态 if state: - self.transfer_completed(hashs=torrent.hash) + self.transfer_completed(hashs=torrent.hash, downloader=torrent.downloader) # 结束 logger.info("所有下载器中下载完成的文件已整理完成") From 48120b9406d74ed284b34f0f91aa29ffddf55834 Mon Sep 17 00:00:00 2001 From: wumode Date: Mon, 12 May 2025 21:05:30 +0800 Subject: [PATCH 2/2] fix: get_torrent_tags fails to properly retrieve the existing tags --- app/modules/transmission/transmission.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) mode change 100644 => 100755 app/modules/transmission/transmission.py diff --git a/app/modules/transmission/transmission.py b/app/modules/transmission/transmission.py old mode 100644 new mode 100755 index e9f059d6..6f6437f8 --- a/app/modules/transmission/transmission.py +++ b/app/modules/transmission/transmission.py @@ -163,8 +163,9 @@ class Transmission: if not self.trc: return [] try: - torrent = self.trc.get_torrents(ids=ids, arguments=self._trarg) - if torrent: + torrents = self.trc.get_torrents(ids=ids, arguments=self._trarg) + if len(torrents): + torrent = torrents[0] labels = [str(tag).strip() for tag in torrent.labels] if hasattr(torrent, "labels") else [] return labels