diff --git a/docs/API.md b/docs/API.md index e79446cb..2cdce6f0 100644 --- a/docs/API.md +++ b/docs/API.md @@ -95,6 +95,15 @@ Maintainerr exposes lightweight health endpoints under `/api/health` (prefixed w | `DELETE /api/settings/emby` | Remove the saved Emby connection settings | | `POST /api/settings/emby/login` | Authenticate with an Emby admin username/password and return an API key plus admin-user choices | +### Download Client + +| Endpoint | Purpose | +| ----------------------------------------- | ------------------------------------------------------------------------------- | +| `GET /api/settings/download-client` | Read the saved qBittorrent connection and cleanup options | +| `POST /api/settings/download-client` | Save qBittorrent connection and cleanup options | +| `DELETE /api/settings/download-client` | Remove the saved download-client connection settings | +| `POST /api/settings/test/download-client` | Test the qBittorrent Web UI URL, credentials, and cleanup options before saving | + ### Streamystats (Jellyfin only) | Endpoint | Purpose | diff --git a/docs/Migration.md b/docs/Migration.md index b25af6e2..e0fed350 100644 --- a/docs/Migration.md +++ b/docs/Migration.md @@ -137,6 +137,7 @@ Recent Maintainerr releases also add database support for overlays. - new overlay template, overlay settings, and overlay item state tables - new collection fields for `overlayEnabled`, `overlayTemplateId`, and `mediaServerSort` - new `streamystats_url` setting for the Jellyfin-only Streamystats integration +- new download-client settings for the qBittorrent cleanup integration: URL, optional username/password, whether download data should be deleted, and the fallback seeding ratio - new `collection_media.ruleEvaluationFailed` state so upgrades can preserve which rule-managed items should be skipped by automatic handling after a rule-evaluation failure; manual collection entries are still handled normally - new `NormalizeRuleSectionOperators` migration that backfills legacy null operators without changing existing matches: the first rule of a group stays unset, the first rule of a later section becomes `AND`, and later rules in that section become `OR`. This migration is behavior-preserving and its `down()` is a no-op. diff --git a/static/openapi-spec/maintainerr_api_specs.yaml b/static/openapi-spec/maintainerr_api_specs.yaml index 716c2a5f..f6deb1f7 100644 --- a/static/openapi-spec/maintainerr_api_specs.yaml +++ b/static/openapi-spec/maintainerr_api_specs.yaml @@ -315,6 +315,56 @@ paths: description: '' tags: - /settings + /api/settings/download-client: + get: + operationId: SettingsController_getDownloadClientSetting + parameters: [] + responses: + '200': + description: Returns the saved qBittorrent connection and cleanup options. + content: + application/json: + schema: + $ref: '#/components/schemas/DownloadClientSetting' + tags: + - /settings + post: + operationId: SettingsController_updateDownloadClientSetting + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/DownloadClientSetting' + responses: + '201': + description: Saves qBittorrent connection and cleanup options. + tags: + - /settings + delete: + operationId: SettingsController_removeDownloadClientSetting + parameters: [] + responses: + '200': + description: Removes the saved download-client connection settings. + tags: + - /settings + /api/settings/test/download-client: + post: + operationId: SettingsController_testDownloadClient + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/DownloadClientSetting' + responses: + '201': + description: Tests the qBittorrent Web UI URL, credentials, and cleanup options. + tags: + - /settings /api/settings/emby: get: operationId: SettingsController_getEmbySetting @@ -1841,6 +1891,26 @@ components: SettingDto: type: object properties: {} + DownloadClientSetting: + type: object + properties: + download_client_url: + type: string + download_client_username: + type: string + default: '' + download_client_password: + type: string + default: '' + download_client_delete_data: + type: boolean + download_client_fallback_ratio: + type: number + minimum: 0.5 + required: + - download_client_url + - download_client_delete_data + - download_client_fallback_ratio EmbySetting: type: object properties: