qBittorrent API
This commit is contained in:
+16
-1
@@ -5,7 +5,7 @@ from functools import partial
|
||||
|
||||
from .memory import Memory
|
||||
from .tools.filesystem import set_path_for_folder, list_folder
|
||||
from .tools.api import find_media_imdb_id, find_torrent
|
||||
from .tools.api import find_media_imdb_id, find_torrent, add_torrent_to_qbittorrent
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -103,6 +103,21 @@ def make_tools(memory: Memory) -> Dict[str, Tool]:
|
||||
"required": ["media_title"]
|
||||
}
|
||||
),
|
||||
Tool(
|
||||
name="add_torrent_to_qbittorrent",
|
||||
description="Adds a torrent to qBittorrent client.",
|
||||
func=add_torrent_to_qbittorrent,
|
||||
parameters={
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"magnet_link": {
|
||||
"type": "string",
|
||||
"description": "Title of the media to find torrents for"
|
||||
},
|
||||
},
|
||||
"required": ["magnet_link"]
|
||||
}
|
||||
),
|
||||
]
|
||||
|
||||
return {t.name: t for t in tools}
|
||||
|
||||
Reference in New Issue
Block a user