Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions src/settings/_download_clients_sabnzbd.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,21 @@ async def check_connected(self):
"_download_clients_sabnzbd.py/check_connected: Checking if SABnzbd is connected"
)
params = {"mode": "status", "apikey": self.api_key, "output": "json"}
response = await make_request(
"get",
self.api_url,
self.settings,
timeout=self.timeout,
params=params,
)
status_data = response.json()
try:
response = await make_request(
"get",
self.api_url,
self.settings,
timeout=self.timeout,
params=params,
)
status_data = response.json()
except Exception:
logger.warning(
">>> %s: Failed to reach SABnzbd status endpoint. Treating as disconnected.",
self.name,
)
return False
# SABnzbd doesn't have a direct "disconnected" status like qBittorrent
# We check if we can get status successfully
return "status" in status_data
Expand Down
Loading