qBittorrent API

This commit is contained in:
2025-11-30 02:35:14 +01:00
parent ec9a2d4d36
commit 2098eee76e
4 changed files with 541 additions and 2 deletions
+16 -1
View File
@@ -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}