mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-07-08 22:15:04 +08:00
feat: 新增修改下载任务Agent工具,查询下载任务支持返回标签
- 新增 modify_download Agent工具,支持通过hash修改下载任务的标签、开始和暂停下载 - 在 ChainBase 及三个下载器模块中新增 set_torrents_tag 方法 - DownloadingTorrent schema 新增 tags 字段 - 各下载器模块构建 DownloadingTorrent 时填充 tags - query_download_tasks 工具输出中新增 tags 字段
This commit is contained in:
@@ -1034,6 +1034,18 @@ class ChainBase(metaclass=ABCMeta):
|
||||
"""
|
||||
return self.run_module("stop_torrents", hashs=hashs, downloader=downloader)
|
||||
|
||||
def set_torrents_tag(
|
||||
self, hashs: Union[list, str], tags: list, downloader: Optional[str] = None
|
||||
) -> bool:
|
||||
"""
|
||||
设置种子标签
|
||||
:param hashs: 种子Hash
|
||||
:param tags: 标签列表
|
||||
:param downloader: 下载器
|
||||
:return: bool
|
||||
"""
|
||||
return self.run_module("set_torrents_tag", hashs=hashs, tags=tags, downloader=downloader)
|
||||
|
||||
def torrent_files(
|
||||
self, tid: str, downloader: Optional[str] = None
|
||||
) -> Optional[Union[TorrentFilesList, List[File]]]:
|
||||
|
||||
Reference in New Issue
Block a user