Merge pull request #4262 from wumode/fix_4180

This commit is contained in:
jxxghp
2025-05-12 21:16:48 +08:00
committed by GitHub
2 changed files with 4 additions and 3 deletions

2
app/chain/transfer.py Normal file → Executable file
View File

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

5
app/modules/transmission/transmission.py Normal file → Executable file
View File

@@ -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