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("所有下载器中下载完成的文件已整理完成") 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