Clarify qBittorrent status and fix status pill contrast

This commit is contained in:
2026-05-24 17:03:45 +12:00
parent 0700d37469
commit 329884b789
4 changed files with 69 additions and 8 deletions
+11
View File
@@ -52,6 +52,17 @@ class QBittorrentClient(ApiClient):
response = await client.post(f"{self.base_url}{path}", data=data)
response.raise_for_status()
async def is_webui_reachable(self) -> bool:
if not self.base_url:
return False
try:
async with httpx.AsyncClient(timeout=10.0, follow_redirects=True) as client:
response = await client.get(self.base_url)
response.raise_for_status()
return True
except httpx.HTTPError:
return False
async def get_torrents(self) -> Optional[Any]:
return await self._get("/api/v2/torrents/info")