Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
042529f
Added new config to sort torrents and implemented sorting
Mar 15, 2026
f79a469
Added frontend changes
Mar 24, 2026
c21c55c
Added documentation
Mar 24, 2026
01e68d2
Merge branch 'master' into 333-feat-hr-prioritization
Feramance Mar 24, 2026
fe6b0ab
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 24, 2026
3d3af7f
fix: reduce tracker API calls and enforce queue sort order
cursoragent Mar 24, 2026
ab4f099
fix: apply tracker cache clear and sorting in placeholder processing
cursoragent Mar 24, 2026
1c957ed
Merge remote-tracking branch 'origin/master' into 333-feat-hr-priorit…
Mar 24, 2026
0ecdec3
Added security policy and added log warning when auth is disabled
Mar 24, 2026
98a0e4c
Added pyarr transaltion for backwards compatibility
Mar 24, 2026
6288b10
Fixed pre-commit changes
Mar 24, 2026
7f87d40
fix: pass empty set for removed trackers
cursoragent Mar 24, 2026
8da4f0f
fix: harden pyarr v6 compatibility boundary
Mar 24, 2026
15f671c
fix: normalize v6 client constructor args
Mar 24, 2026
73b3748
fix: keep torrent sorting failures non-fatal
Mar 24, 2026
7dde1e6
fix: initialize sort_torrents in PlaceHolderArr
cursoragent Mar 24, 2026
f3b8ee4
fix: survive pyarr connection errors in search loop and default api_v…
Mar 24, 2026
ad902d4
Merge branch '333-feat-hr-prioritization' of https://github.com/Feram…
Mar 24, 2026
2917c2e
fix: initialize sort_torrents in PlaceHolderArr
cursoragent Mar 24, 2026
f786cfd
Merge branch '333-feat-hr-prioritization' of https://github.com/Feram…
Mar 24, 2026
48a7eff
fix: skip unnecessary torrent reordering API calls
cursoragent Mar 24, 2026
9ebaea3
fix: handle tracker sort failures and safe pyarr fallbacks
cursoragent Mar 24, 2026
a4f0c98
fix: handle DelayLoopException in torrent sorting
cursoragent Mar 24, 2026
33bd9b3
fix: preserve implicit http/https ports in pyarr compat
cursoragent Mar 24, 2026
84c7cf4
fix: compare qbit queue order per queue type
cursoragent Mar 24, 2026
b7b5303
fix: handle pyarr connection retries in torrent loop
Mar 24, 2026
748ea3e
Merge branch '333-feat-hr-prioritization' of https://github.com/Feram…
Mar 24, 2026
fd13224
merge: conclude branch sync
Mar 24, 2026
e37248e
fix: normalize blocklist kwarg in legacy del_queue compat path
cursoragent Mar 24, 2026
2c6b2f0
fix: handle id_ kwarg in v6 get_episode series path
cursoragent Mar 24, 2026
cd52256
fix: pass pending removed trackers during sort priority
cursoragent Mar 24, 2026
521da1f
Adjusted pyarr exception handling
Mar 24, 2026
1c77d92
Added new trakcer sort manager to attempt to have torrent sorting wor…
Apr 2, 2026
b2b3552
fix: set TrackerSortManager category for restart lookup
cursoragent Apr 2, 2026
fc2cc49
fix: continue torrent sorting after per-torrent API errors
cursoragent Apr 2, 2026
a69db91
fix: narrow tracker priority exception handling
cursoragent Apr 2, 2026
e1f9119
Fixed tracker sorted to grab managed categories
Apr 2, 2026
0efbf8d
Added swagger/openapi endpoints to qBitrr and docs
Apr 2, 2026
eec9760
fix: correct OpenAPI security object types and preserve episode kwargs
cursoragent Apr 2, 2026
98463ee
Fixing free space handling as it was not processing all qbit instance…
Apr 10, 2026
bd49bc5
Merge origin/master into 333-feat-hr-prioritization
Apr 10, 2026
46b63a8
Merge branch 'master' into 333-feat-hr-prioritization
Feramance Apr 10, 2026
a2703b6
Fixed pause processing issue
Apr 10, 2026
d11650f
Merge remote-tracking branch 'origin/master' into 333-feat-hr-priorit…
Apr 10, 2026
af6d2f7
Build(security): pin brace-expansion to patched release
Apr 10, 2026
2d23600
Fixed free space config reload on changing settings via webui
Apr 10, 2026
2314576
Bug fixes
Apr 10, 2026
ffd9a50
Fixed auto pause resume config loading
Apr 10, 2026
8562d85
Fixed empty path handling
Apr 10, 2026
1a65b5c
Updated docs and fixed decrement order
Apr 10, 2026
5fe452b
fix: initialize TrackerSortManager base attrs
cursoragent Apr 10, 2026
3aee057
fix: resume free-space paused torrents
cursoragent Apr 10, 2026
bbdb372
fix: only resume free-space-paused torrents
cursoragent Apr 10, 2026
e8f2b16
Priority order changed to use tracker tags when present and added rem…
Apr 10, 2026
cc61daf
Fixed priority handling for dree space manager to work alongside trac…
Apr 10, 2026
706c160
fix: avoid redundant tracker tag merge recomputation
cursoragent Apr 10, 2026
74eb57f
Agents update
Apr 10, 2026
07a6743
Config example updates for skip TLS
Apr 10, 2026
72913ff
Doc updates for TLS and free space manager/tracker sorter updates
Apr 10, 2026
08e2f8b
Consolidated vars and functions where possible. Also consolidated glo…
Apr 10, 2026
7519a67
Merge branch '333-feat-hr-prioritization' of https://github.com/Feram…
Apr 10, 2026
e414bf6
Fixes in policy manager
Apr 12, 2026
357bedb
fix: treat boolean tracker priority as default
cursoragent Apr 12, 2026
3878bcb
Updated workding and chip info for Torrent Policy Manager in process…
Apr 12, 2026
f2d47a6
Small fixes
Apr 12, 2026
153b3cf
fix: remove unreachable PyarrConnectionError handler in search loop
cursoragent Apr 12, 2026
9f7d608
Merge origin/master into 333-feat-hr-prioritization.
Apr 13, 2026
4d2e757
npm package fixes
Apr 13, 2026
1daddc2
fix: guard free-space init and restore deletion debug logging
cursoragent Apr 13, 2026
490b61e
Free space set to only active in policy manager when enabled
Apr 13, 2026
f125855
Merge branch '333-feat-hr-prioritization' of https://github.com/Feram…
Apr 13, 2026
05785c5
Updated behaviour of Torrent policy manager process and redid the sor…
Apr 14, 2026
25bdbc4
Small fixes
Apr 14, 2026
9d1bff7
fixed lidarr album grabbing and fixed package and lock versions
Apr 15, 2026
e5d6662
adjusted accent colour, logo rendering, and filtered web endpoints fr…
Apr 15, 2026
56e0b99
API docs update
Feramance Apr 15, 2026
43a8a41
Fixed dataclass
Apr 15, 2026
9102a25
Revert logo changes
Apr 15, 2026
b54bf42
Small changes
Apr 15, 2026
7276767
Fixed lidarr album db entry
Apr 17, 2026
0be154b
Fixed update call
Apr 17, 2026
1b6fd8a
Rolled back db update code changes and updated db schema to have prop…
Apr 17, 2026
97abc24
Bumper version config fixes
Apr 17, 2026
7bd2c90
Merge origin/master into 333-feat-hr-prioritization
Apr 20, 2026
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
6 changes: 6 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ replace = **Latest Release**: v{new_version}
search = EXPECTED_CONFIG_VERSION = "{current_version}"
replace = EXPECTED_CONFIG_VERSION = "{new_version}"

[bumpversion:file:qBitrr/gen_config.py]
search = "ConfigVersion",
"{current_version}",
replace = "ConfigVersion",
"{new_version}",

[bumpversion:file:docs/configuration/config-file.md]
search = ConfigVersion = "{current_version}"
replace = ConfigVersion = "{new_version}"
8 changes: 5 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
- **Entry Point**: `qBitrr.main:run` → spawns WebUI, ArrManager loops, auto-update watchers
- **Key Modules**:
- `qBitrr/main.py` – orchestrates multiprocessing, launches arr managers and WebUI
- `qBitrr/arss.py` – ArrManager classes (Radarr/Sonarr/Lidarr) with health checks & import logic
- `qBitrr/arss.py` – `Arr` (Radarr/Sonarr/Lidarr via `self.type`), `ArrManager`, `PlaceHolderArr`, `FreeSpaceManager`, `TrackerSortManager`; health checks & import logic
- `qBitrr/arr_tracker_index.py` – shared tracker config → derived URI/host sets (`build_tracker_index`, `extract_tracker_host`)
- `qBitrr/config.py` – TOML config parsing, validation, migrations
- `qBitrr/webui.py` – Flask routes for `/api/*` (token-protected) and `/web/*` (helpers)
- `qBitrr/ffprobe.py` – media file verification via ffprobe
Expand Down Expand Up @@ -94,6 +95,7 @@
- **User Messages**: Provide actionable error messages; reference config keys, Arr instance names, torrent hashes

## Architecture & Patterns
- **Arr / Radarr-Sonarr-Lidarr**: One `Arr` class branches on `self.type` (`"radarr"`, `"sonarr"`, `"lidarr"`). Prefer extracting shared logic into helpers (e.g. `arr_tracker_index.py`) before adding subclasses; per-app handler objects are optional for future refactors
- **Multiprocessing**: `pathos.multiprocessing` for cross-platform support; each Arr instance runs in a separate process
- **Threading**: WebUI runs in main thread; auto-update, network monitor, and FFprobe downloads in background threads
- **Database**: Peewee ORM with SQLite (thread-safe via `db_lock.py`); tables: `DownloadsModel`, `SearchModel`, `EntryExpiry`
Expand All @@ -108,7 +110,7 @@
- **Config Changes**: Edit `qBitrr/gen_config.py` (MyConfig class); regenerate example via `qbitrr --gen-config`
- **WebUI Changes**: Run `npm run dev` in webui/, API requests proxy to http://localhost:6969
- **Database Schema**: Modify `qBitrr/tables.py`, add migration logic in `config.py:apply_config_migrations()`
- **New Arr Type**: Subclass `ArrManagerBase` in `arss.py`, implement `_process_failed_individual()`, register in `main.py`
- **New Arr Type**: Radarr/Sonarr/Lidarr share the `Arr` class (`self.type`); add API branches in `arss.py` and config in `gen_config.py`. Special workers subclass `Arr` (`PlaceHolderArr`, etc.) without calling full `Arr.__init__`. Register new managed instances in `ArrManager.build_arr_instances()` / `main.py` as needed
- **Pre-commit Bypass**: `git commit --no-verify` (discouraged; use for emergency hotfixes only)

## Testing & Validation
Expand Down Expand Up @@ -346,7 +348,7 @@ When making code changes, update the following documentation as applicable:

#### 4. API Documentation
- **`docs/reference/api.md`**: Update if adding/changing WebUI API endpoints
- **OpenAPI/Swagger**: Update specs if applicable
- **OpenAPI/Swagger**: Keep [`qBitrr/openapi.json`](qBitrr/openapi.json) in sync when adding or changing REST routes; interactive UI is served at `/web/docs` and `/api/docs` (see [`docs/webui/api.md`](docs/webui/api.md))

### Documentation Quality Standards

Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
recursive-include qBitrr/static *
include qBitrr/openapi.json
include config.example.toml
23 changes: 23 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Security Policy

## Supported versions

Security fixes are provided **only for the latest released version** of qBitrr. Older releases are not maintained for security patches. [Upgrade to the latest release](https://github.com/Feramance/qBitrr/releases/latest) to receive security updates.

## Reporting a vulnerability

Report security issues **privately** so they can be fixed before public disclosure.

**Preferred:** Use GitHub's private reporting flow: open the [Security tab](https://github.com/Feramance/qBitrr/security), then use **Report a vulnerability**.

Please include:

- A clear description of the issue and its potential impact
- Steps to reproduce (if possible)
- The qBitrr version and environment you tested (OS, install method, relevant config if safe to share)

We will acknowledge receipt when we can and coordinate on a fix and disclosure timeline where appropriate.

## Coordinated disclosure

Please do not publish details of an unfixed vulnerability until a fix is available, unless we agree otherwise.
42 changes: 42 additions & 0 deletions config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ UserName = "CHANGE_ME"
# If you set "Bypass authentication on localhost or whitelisted IPs" remove this field.
Password = "CHANGE_ME"

# If true, do not verify TLS certificates for HTTPS WebUI (self-signed certs). Disables MITM protection for that connection.
SkipTLSVerify = false

# Categories managed directly by this qBit instance (not managed by Arr instances).
# These categories will have seeding settings applied according to CategorySeeding configuration.
# Example: ['downloads', 'private-tracker', 'long-term-seed']
Expand Down Expand Up @@ -229,6 +232,9 @@ URI = "CHANGE_ME"
# The Servarr API Key, Can be found it Settings > General > Security
APIKey = "CHANGE_ME"

# If true, do not verify TLS for this Servarr API (HTTPS). Does not affect Overseerr/Ombi. Disables MITM protection for that connection.
SkipTLSVerify = false

# Category applied by Servarr to torrents in qBitTorrent, can be found in Settings > Download Clients > qBit > Category
Category = "sonarr-tv"

Expand Down Expand Up @@ -329,6 +335,9 @@ OmbiAPIKey = "CHANGE_ME"
# Only process approved requests
ApprovedOnly = true

# If true, do not verify TLS for Ombi HTTPS (self-signed). Disables MITM protection.
SkipTLSVerify = false

[Sonarr-TV.EntrySearch.Overseerr]
# Search Overseerr for pending requests (Will only work if 'SearchMissing' is enabled.)
# If this and Ombi are both enable, Ombi will be ignored
Expand All @@ -343,6 +352,9 @@ OverseerrAPIKey = "CHANGE_ME"
# Only process approved requests
ApprovedOnly = true

# If true, do not verify TLS for Overseerr HTTPS (self-signed). Disables MITM protection.
SkipTLSVerify = false

# Only for 4K Instances
# Only for 4K Instances
Is4K = false
Expand Down Expand Up @@ -431,6 +443,9 @@ URI = "CHANGE_ME"
# The Servarr API Key, Can be found it Settings > General > Security
APIKey = "CHANGE_ME"

# If true, do not verify TLS for this Servarr API (HTTPS). Does not affect Overseerr/Ombi. Disables MITM protection for that connection.
SkipTLSVerify = false

# Category applied by Servarr to torrents in qBitTorrent, can be found in Settings > Download Clients > qBit > Category
Category = "sonarr-anime"

Expand Down Expand Up @@ -531,6 +546,9 @@ OmbiAPIKey = "CHANGE_ME"
# Only process approved requests
ApprovedOnly = true

# If true, do not verify TLS for Ombi HTTPS (self-signed). Disables MITM protection.
SkipTLSVerify = false

[Sonarr-Anime.EntrySearch.Overseerr]
# Search Overseerr for pending requests (Will only work if 'SearchMissing' is enabled.)
# If this and Ombi are both enable, Ombi will be ignored
Expand All @@ -545,6 +563,9 @@ OverseerrAPIKey = "CHANGE_ME"
# Only process approved requests
ApprovedOnly = true

# If true, do not verify TLS for Overseerr HTTPS (self-signed). Disables MITM protection.
SkipTLSVerify = false

# Only for 4K Instances
# Only for 4K Instances
Is4K = false
Expand Down Expand Up @@ -633,6 +654,9 @@ URI = "CHANGE_ME"
# The Servarr API Key, Can be found it Settings > General > Security
APIKey = "CHANGE_ME"

# If true, do not verify TLS for this Servarr API (HTTPS). Does not affect Overseerr/Ombi. Disables MITM protection for that connection.
SkipTLSVerify = false

# Category applied by Servarr to torrents in qBitTorrent, can be found in Settings > Download Clients > qBit > Category
Category = "radarr-1080"

Expand Down Expand Up @@ -724,6 +748,9 @@ OmbiAPIKey = "CHANGE_ME"
# Only process approved requests
ApprovedOnly = true

# If true, do not verify TLS for Ombi HTTPS (self-signed). Disables MITM protection.
SkipTLSVerify = false

[Radarr-1080.EntrySearch.Overseerr]
# Search Overseerr for pending requests (Will only work if 'SearchMissing' is enabled.)
# If this and Ombi are both enable, Ombi will be ignored
Expand All @@ -738,6 +765,9 @@ OverseerrAPIKey = "CHANGE_ME"
# Only process approved requests
ApprovedOnly = true

# If true, do not verify TLS for Overseerr HTTPS (self-signed). Disables MITM protection.
SkipTLSVerify = false

# Only for 4K Instances
# Only for 4K Instances
Is4K = false
Expand Down Expand Up @@ -826,6 +856,9 @@ URI = "CHANGE_ME"
# The Servarr API Key, Can be found it Settings > General > Security
APIKey = "CHANGE_ME"

# If true, do not verify TLS for this Servarr API (HTTPS). Does not affect Overseerr/Ombi. Disables MITM protection for that connection.
SkipTLSVerify = false

# Category applied by Servarr to torrents in qBitTorrent, can be found in Settings > Download Clients > qBit > Category
Category = "radarr-4k"

Expand Down Expand Up @@ -917,6 +950,9 @@ OmbiAPIKey = "CHANGE_ME"
# Only process approved requests
ApprovedOnly = true

# If true, do not verify TLS for Ombi HTTPS (self-signed). Disables MITM protection.
SkipTLSVerify = false

[Radarr-4K.EntrySearch.Overseerr]
# Search Overseerr for pending requests (Will only work if 'SearchMissing' is enabled.)
# If this and Ombi are both enable, Ombi will be ignored
Expand All @@ -931,6 +967,9 @@ OverseerrAPIKey = "CHANGE_ME"
# Only process approved requests
ApprovedOnly = true

# If true, do not verify TLS for Overseerr HTTPS (self-signed). Disables MITM protection.
SkipTLSVerify = false

# Only for 4K Instances
# Only for 4K Instances
Is4K = true
Expand Down Expand Up @@ -1019,6 +1058,9 @@ URI = "CHANGE_ME"
# The Servarr API Key, Can be found it Settings > General > Security
APIKey = "CHANGE_ME"

# If true, do not verify TLS for this Servarr API (HTTPS). Disables MITM protection for that connection.
SkipTLSVerify = false

# Category applied by Servarr to torrents in qBitTorrent, can be found in Settings > Download Clients > qBit > Category
Category = "lidarr-music"

Expand Down
3 changes: 3 additions & 0 deletions docs/configuration/arr/lidarr.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ URI = "http://localhost:8686"
# Lidarr API Key (Settings > General > Security)
APIKey = "your-lidarr-api-key"

# Optional: set true only if Lidarr uses HTTPS with a self-signed or untrusted certificate
SkipTLSVerify = false

# Category applied by Lidarr to torrents in qBittorrent
# MUST match: Lidarr > Settings > Download Clients > qBittorrent > Category
Category = "lidarr-music"
Expand Down
3 changes: 3 additions & 0 deletions docs/configuration/arr/radarr.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ URI = "http://localhost:7878"
# Radarr API Key (Settings > General > Security)
APIKey = "your-radarr-api-key"

# Optional: set true only if Radarr uses HTTPS with a self-signed or untrusted certificate
SkipTLSVerify = false

# Category applied by Radarr to torrents in qBittorrent
# MUST match: Radarr > Settings > Download Clients > qBittorrent > Category
Category = "radarr-movies"
Expand Down
3 changes: 3 additions & 0 deletions docs/configuration/arr/sonarr.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ URI = "http://localhost:8989"
# Sonarr API Key (Settings > General > Security)
APIKey = "your-sonarr-api-key"

# Optional: set true only if Sonarr uses HTTPS with a self-signed or untrusted certificate
SkipTLSVerify = false

# Category applied by Sonarr to torrents in qBittorrent
# MUST match: Sonarr > Settings > Download Clients > qBittorrent > Category
Category = "sonarr-tv"
Expand Down
12 changes: 5 additions & 7 deletions docs/configuration/config-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ FreeSpace = "50G"
**Default:** `"-1"` (disabled)
**Format:** Number + Unit (`K`, `M`, `G`, `T`)

Minimum free space to maintain in download directory. When free space drops below this threshold, qBitrr pauses downloads.
Minimum free space to maintain in download directory. When usable space above this threshold is insufficient, qBitrr pauses **managed-category** downloads as needed, in **torrent `priority` order**, using a simulated budget so torrents that do not fit do not block smaller ones (see [Disk Space Management — Queue order and simulated budget](../features/disk-space.md#queue-order-and-simulated-budget)).

**Units:**

Expand All @@ -284,12 +284,10 @@ FreeSpace = "-1" # Disabled
**How it works:**

1. qBitrr monitors `FreeSpaceFolder` every loop
2. If free space < `FreeSpace` threshold:
- Pauses all downloads
- Keeps seeding active
- Logs warning
3. When space frees up:
- Resumes downloads automatically
2. If usable space is tight relative to the threshold, qBitrr evaluates downloads in monitored categories in **priority order** and pauses those that would exceed the simulated budget (see [Queue order and simulated budget](../features/disk-space.md#queue-order-and-simulated-budget))
3. Keeps seeding active and logs warnings as needed
4. When space frees up:
- Resumes downloads automatically where appropriate

**Recommendation:** Set to 10-20% of your disk capacity.

Expand Down
7 changes: 7 additions & 0 deletions docs/configuration/qbittorrent.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,15 @@ Port = 8080
# qBittorrent WebUI Authentication
UserName = "admin"
Password = "your-password"

# Optional: set true only if the Web UI uses HTTPS with a self-signed or untrusted certificate
SkipTLSVerify = false
```

When **`SkipTLSVerify`** is **`true`**, qBitrr does not verify the TLS certificate for the qBittorrent Web API. Use only on trusted networks; verification is disabled for that connection (MITM risk).

Additional qBittorrent instances use **`[qBit-<name>]`** with the same keys, including **`SkipTLSVerify`** per instance.

!!! tip "Finding qBittorrent Settings"
Open qBittorrent → **Tools** → **Options** → **Web UI** tab to find your connection details.

Expand Down
Loading
Loading