-
-
Notifications
You must be signed in to change notification settings - Fork 74
Description
Summary
qbit_manage repeatedly tries to set a category (seedpool) and fails with Conflict409Error (Incorrect category name). The category does not exist in qBittorrent, and qbit_manage’s auto‑create logic never triggers because it only checks for "not found" or "409" in the exception text. Result: category is never created and the same error repeats every run.
Environment
- qbit_manage: 4.6.5 (Docker)
- qBittorrent: 5.1.4
- qBittorrent Web API: 2.11.4
- Container: ghcr.io/stuffanthings/qbit_manage:latest
- OS: Linux (Docker)
Config (snippet)
Tracker mapping includes:
- tracker key:
seedpool - category:
seedpool - tags:
seedpool,private
Logs (repeats every run)
[2026-01-20 19:52:11,030] [handle_api_error:68] [ERROR] qBittorrent API Error in set_category: Incorrect category name - Connection failed. Check qBittorrent server status.
[2026-01-20 19:52:11,030] [wrapper:222] [INFO] Skipping operation due to Conflict409Error
[2026-01-20 19:52:11,030] [update_cat:123] [INFO] Torrent Name: Pokemon.Concierge.S01.1080p.NF.WEB-DL.DUAL.DDP5.1.H.264-VARYG
[2026-01-20 19:52:11,030] [update_cat:129] [INFO] New Category: seedpool
[2026-01-20 19:52:11,030] [update_cat:130] [INFO] Tracker: https://seedpool.org
(The same block repeats in subsequent runs.)
Root Cause
In modules/core/category.py, auto‑create only triggers if:
"not found" in str(e).lower() or "409" in str(e)
But qbittorrentapi raises Conflict409Error with message "Incorrect category name", which does not include "409" or "not found". So qbit_manage skips without creating the category and continues to fail every run.
Expected behavior
If category doesn’t exist, qbit_manage should create it and retry, or otherwise handle Conflict409Error consistently.
Suggested fix
Treat Conflict409Error (or message “Incorrect category name”) as a missing category and create it, e.g.:
- catch
Conflict409Errorexplicitly, or - broaden the auto‑create condition to include “incorrect category name”.
Workaround
Manually create the category in qBittorrent first (createCategory), then setCategory succeeds and qbit_manage stops logging the error.