fix download && message

This commit is contained in:
jxxghp
2024-09-19 08:30:58 +08:00
parent 152546d89a
commit 786b317cea
9 changed files with 37 additions and 37 deletions
+4 -4
View File
@@ -146,7 +146,7 @@ class TransmissionModule(_ModuleBase, _DownloaderBase):
if settings.TORRENT_TAG and settings.TORRENT_TAG not in labels:
labels.append(settings.TORRENT_TAG)
server.set_torrent_tag(ids=torrent_hash, tags=labels)
return downloader or self._default_server, torrent_hash, f"下载任务已存在"
return downloader or self._default_server_name, torrent_hash, f"下载任务已存在"
return None, None, f"添加种子任务失败:{content}"
else:
torrent_hash = torrent.hashString
@@ -154,7 +154,7 @@ class TransmissionModule(_ModuleBase, _DownloaderBase):
# 选择文件
torrent_files = server.get_files(torrent_hash)
if not torrent_files:
return downloader or self._default_server, torrent_hash, "获取种子文件失败,下载任务可能在暂停状态"
return downloader or self._default_server_name, torrent_hash, "获取种子文件失败,下载任务可能在暂停状态"
# 需要的文件信息
file_ids = []
unwanted_file_ids = []
@@ -175,9 +175,9 @@ class TransmissionModule(_ModuleBase, _DownloaderBase):
server.set_unwanted_files(torrent_hash, unwanted_file_ids)
# 开始任务
server.start_torrents(torrent_hash)
return downloader or self._default_server, torrent_hash, "添加下载任务成功"
return downloader or self._default_server_name, torrent_hash, "添加下载任务成功"
else:
return downloader or self._default_server, torrent_hash, "添加下载任务成功"
return downloader or self._default_server_name, torrent_hash, "添加下载任务成功"
def list_torrents(self, status: TorrentStatus = None,
hashs: Union[list, str] = None,