qBitrr2 5.5.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. qBitrr/__init__.py +14 -0
  2. qBitrr/arss.py +7100 -0
  3. qBitrr/auto_update.py +382 -0
  4. qBitrr/bundled_data.py +7 -0
  5. qBitrr/config.py +192 -0
  6. qBitrr/config_version.py +144 -0
  7. qBitrr/db_lock.py +400 -0
  8. qBitrr/db_recovery.py +202 -0
  9. qBitrr/env_config.py +73 -0
  10. qBitrr/errors.py +41 -0
  11. qBitrr/ffprobe.py +105 -0
  12. qBitrr/gen_config.py +1331 -0
  13. qBitrr/home_path.py +23 -0
  14. qBitrr/logger.py +235 -0
  15. qBitrr/main.py +790 -0
  16. qBitrr/search_activity_store.py +92 -0
  17. qBitrr/static/assets/ArrView.js +2 -0
  18. qBitrr/static/assets/ArrView.js.map +1 -0
  19. qBitrr/static/assets/ConfigView.js +4 -0
  20. qBitrr/static/assets/ConfigView.js.map +1 -0
  21. qBitrr/static/assets/LogsView.js +2 -0
  22. qBitrr/static/assets/LogsView.js.map +1 -0
  23. qBitrr/static/assets/ProcessesView.js +2 -0
  24. qBitrr/static/assets/ProcessesView.js.map +1 -0
  25. qBitrr/static/assets/app.css +1 -0
  26. qBitrr/static/assets/app.js +11 -0
  27. qBitrr/static/assets/app.js.map +1 -0
  28. qBitrr/static/assets/build.svg +3 -0
  29. qBitrr/static/assets/check-mark.svg +5 -0
  30. qBitrr/static/assets/close.svg +4 -0
  31. qBitrr/static/assets/download.svg +5 -0
  32. qBitrr/static/assets/gear.svg +5 -0
  33. qBitrr/static/assets/live-streaming.svg +8 -0
  34. qBitrr/static/assets/log.svg +3 -0
  35. qBitrr/static/assets/logo.svg +48 -0
  36. qBitrr/static/assets/plus.svg +4 -0
  37. qBitrr/static/assets/process.svg +15 -0
  38. qBitrr/static/assets/react-select.esm.js +7 -0
  39. qBitrr/static/assets/react-select.esm.js.map +1 -0
  40. qBitrr/static/assets/refresh-arrow.svg +3 -0
  41. qBitrr/static/assets/table.js +5 -0
  42. qBitrr/static/assets/table.js.map +1 -0
  43. qBitrr/static/assets/trash.svg +8 -0
  44. qBitrr/static/assets/up-arrow.svg +3 -0
  45. qBitrr/static/assets/useInterval.js +2 -0
  46. qBitrr/static/assets/useInterval.js.map +1 -0
  47. qBitrr/static/assets/vendor.js +2 -0
  48. qBitrr/static/assets/vendor.js.map +1 -0
  49. qBitrr/static/assets/visibility.svg +9 -0
  50. qBitrr/static/index.html +33 -0
  51. qBitrr/static/logov2-clean.svg +48 -0
  52. qBitrr/static/manifest.json +23 -0
  53. qBitrr/static/sw.js +87 -0
  54. qBitrr/static/vite.svg +1 -0
  55. qBitrr/tables.py +143 -0
  56. qBitrr/utils.py +274 -0
  57. qBitrr/versioning.py +136 -0
  58. qBitrr/webui.py +3114 -0
  59. qbitrr2-5.5.5.dist-info/METADATA +1191 -0
  60. qbitrr2-5.5.5.dist-info/RECORD +64 -0
  61. qbitrr2-5.5.5.dist-info/WHEEL +5 -0
  62. qbitrr2-5.5.5.dist-info/entry_points.txt +2 -0
  63. qbitrr2-5.5.5.dist-info/licenses/LICENSE +21 -0
  64. qbitrr2-5.5.5.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1191 @@
1
+ Metadata-Version: 2.4
2
+ Name: qBitrr2
3
+ Version: 5.5.5
4
+ Summary: Intelligent automation for qBittorrent and *Arr apps (Radarr/Sonarr/Lidarr) - health monitoring, instant imports, quality upgrades, request integration
5
+ Home-page: https://github.com/Feramance/qBitrr
6
+ Author: Feramance
7
+ Author-email: fera@fera.wtf
8
+ License: MIT
9
+ Project-URL: Homepage, https://github.com/Feramance/qBitrr
10
+ Project-URL: Documentation, https://github.com/Feramance/qBitrr/blob/master/API_DOCUMENTATION.md
11
+ Project-URL: Issue Tracker, https://github.com/Feramance/qBitrr/issues
12
+ Project-URL: Source Code, https://github.com/Feramance/qBitrr
13
+ Project-URL: Changelog, https://github.com/Feramance/qBitrr/blob/master/CHANGELOG.md
14
+ Project-URL: Docker Hub, https://hub.docker.com/r/feramance/qbitrr
15
+ Project-URL: PyPI, https://pypi.org/project/qBitrr2/
16
+ Project-URL: Systemd Guide, https://github.com/Feramance/qBitrr/blob/master/SYSTEMD_SERVICE.md
17
+ Keywords: qbittorrent,radarr,sonarr,lidarr,arr,automation,torrent,media,plex,jellyfin,overseerr,ombi
18
+ Classifier: Development Status :: 5 - Production/Stable
19
+ Classifier: Intended Audience :: Developers
20
+ Classifier: Intended Audience :: End Users/Desktop
21
+ Classifier: Intended Audience :: System Administrators
22
+ Classifier: License :: OSI Approved :: MIT License
23
+ Classifier: Natural Language :: English
24
+ Classifier: Operating System :: MacOS :: MacOS X
25
+ Classifier: Operating System :: Microsoft :: Windows
26
+ Classifier: Operating System :: POSIX :: Linux
27
+ Classifier: Programming Language :: Python :: 3 :: Only
28
+ Classifier: Programming Language :: Python :: 3.11
29
+ Classifier: Programming Language :: Python :: 3.12
30
+ Classifier: Programming Language :: Python :: Implementation :: CPython
31
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
32
+ Classifier: Topic :: Communications
33
+ Classifier: Topic :: Internet
34
+ Classifier: Topic :: Multimedia :: Video
35
+ Classifier: Topic :: System :: Monitoring
36
+ Classifier: Topic :: Terminals
37
+ Classifier: Topic :: Utilities
38
+ Classifier: Typing :: Typed
39
+ Requires-Python: <4,>=3.11
40
+ Description-Content-Type: text/markdown
41
+ License-File: LICENSE
42
+ Requires-Dist: cachetools
43
+ Requires-Dist: colorama
44
+ Requires-Dist: coloredlogs
45
+ Requires-Dist: flask
46
+ Requires-Dist: environ-config
47
+ Requires-Dist: ffmpeg-python
48
+ Requires-Dist: jaraco.docker
49
+ Requires-Dist: packaging
50
+ Requires-Dist: pathos
51
+ Requires-Dist: peewee
52
+ Requires-Dist: ping3
53
+ Requires-Dist: pyarr
54
+ Requires-Dist: qbittorrent-api
55
+ Requires-Dist: requests
56
+ Requires-Dist: tomlkit
57
+ Requires-Dist: waitress
58
+ Requires-Dist: croniter
59
+ Provides-Extra: dev
60
+ Requires-Dist: black==24.3.0; extra == "dev"
61
+ Requires-Dist: bump2version==1.0.1; extra == "dev"
62
+ Requires-Dist: isort==5.10.1; extra == "dev"
63
+ Requires-Dist: pip-tools==7.3.0; extra == "dev"
64
+ Requires-Dist: pre-commit==3.3.3; extra == "dev"
65
+ Requires-Dist: pyinstaller==5.13.1; extra == "dev"
66
+ Requires-Dist: pyupgrade==2.31.0; extra == "dev"
67
+ Requires-Dist: twine==3.7.1; extra == "dev"
68
+ Requires-Dist: ujson==5.10.0; extra == "dev"
69
+ Requires-Dist: upgrade-pip==0.1.4; extra == "dev"
70
+ Provides-Extra: fast
71
+ Requires-Dist: ujson==5.10.0; extra == "fast"
72
+ Provides-Extra: all
73
+ Requires-Dist: black==24.3.0; extra == "all"
74
+ Requires-Dist: bump2version==1.0.1; extra == "all"
75
+ Requires-Dist: isort==5.10.1; extra == "all"
76
+ Requires-Dist: pip-tools==7.3.0; extra == "all"
77
+ Requires-Dist: pre-commit==3.3.3; extra == "all"
78
+ Requires-Dist: pyinstaller==5.13.1; extra == "all"
79
+ Requires-Dist: pyupgrade==2.31.0; extra == "all"
80
+ Requires-Dist: twine==3.7.1; extra == "all"
81
+ Requires-Dist: ujson==5.10.0; extra == "all"
82
+ Requires-Dist: upgrade-pip==0.1.4; extra == "all"
83
+ Requires-Dist: ujson==5.10.0; extra == "all"
84
+ Dynamic: license-file
85
+
86
+ # <img src="assets/logov2-clean.png" alt="qBitrr Logo" width="40" style="vertical-align: middle;"/> qBitrr
87
+
88
+ [![PyPI](https://img.shields.io/pypi/v/qBitrr2?label=PyPI)](https://pypi.org/project/qBitrr2/)
89
+ [![Downloads](https://img.shields.io/pypi/dm/qBitrr2)](https://pypi.org/project/qBitrr2/)
90
+ [![Docker Pulls](https://img.shields.io/docker/pulls/feramance/qbitrr.svg)](https://hub.docker.com/r/feramance/qbitrr)
91
+ [![CodeQL](https://github.com/Feramance/qBitrr/actions/workflows/codeql.yml/badge.svg?branch=master)](https://github.com/Feramance/qBitrr/actions/workflows/codeql.yml)
92
+ [![Nightly Build](https://github.com/Feramance/qBitrr/actions/workflows/nightly.yml/badge.svg?branch=master)](https://github.com/Feramance/qBitrr/actions/workflows/nightly.yml)
93
+ [![pre-commit.ci](https://results.pre-commit.ci/badge/github/Feramance/qBitrr/master.svg)](https://results.pre-commit.ci/latest/github/Feramance/qBitrr/master)
94
+ [![License: MIT](https://img.shields.io/pypi/l/qbitrr)](LICENSE)
95
+
96
+ > 🧩 qBitrr keeps qBittorrent, Radarr, Sonarr, Lidarr, and your request tools chatting happily so downloads finish, import, and clean up without babysitting.
97
+
98
+ ## πŸ“š What's Inside
99
+ - [Overview](#-overview)
100
+ - [Core Features](#-core-features)
101
+ - [State of the Project](#-state-of-the-project)
102
+ - [Quickstart](#-quickstart)
103
+ - [Install with pip](#install-with-pip)
104
+ - [Run with Docker](#run-with-docker)
105
+ - [Native Systemd Service](#native-systemd-service)
106
+ - [Configuration](#-configuration)
107
+ - [Feature Deep Dive](#-feature-deep-dive)
108
+ - [Torrent Health Monitoring](#-torrent-health-monitoring)
109
+ - [Automated Search & Requests](#-automated-search--requests)
110
+ - [Quality Management](#-quality-management)
111
+ - [Seeding & Tracker Control](#-seeding--tracker-control)
112
+ - [Disk Space Management](#-disk-space-management)
113
+ - [Auto-Updates & Restarts](#-auto-updates--restarts)
114
+ - [Built-in Web UI](#-built-in-web-ui)
115
+ - [Day-to-day Operations](#-day-to-day-operations)
116
+ - [Troubleshooting](#-troubleshooting)
117
+ - [Contributing](#-contributing)
118
+ - [Support](#-support)
119
+ - [License](#-license)
120
+
121
+ ## 🧠 Overview
122
+ qBitrr is the intelligent glue between qBittorrent and the *Arr ecosystem (Radarr, Sonarr, Lidarr). It monitors torrent health, triggers instant imports when downloads complete, automates quality upgrades, manages disk space, integrates with request systems (Overseerr/Ombi), and provides a modern React dashboard for complete visibility and control.
123
+
124
+ ## ✨ Core Features
125
+
126
+ ### πŸš‘ Torrent Health & Import Management
127
+ - **Instant imports** – trigger `DownloadedMoviesScan`/`DownloadedEpisodesScan` the moment torrents finish
128
+ - **Stalled torrent detection** – identify and handle stuck/slow downloads with configurable thresholds
129
+ - **Failed download handling** – automatically blacklist failed torrents in Arr instances and trigger re-searches
130
+ - **FFprobe verification** – validate media files are playable before import (auto-downloads FFprobe binary)
131
+ - **Smart file filtering** – exclude samples, extras, trailers via regex and extension allowlists
132
+
133
+ ### πŸ” Automated Search & Request Integration
134
+ - **Missing media search** – automatically search for missing movies/episodes/albums on schedules
135
+ - **Quality upgrade search** – find better releases for existing media based on quality profiles
136
+ - **Custom format scoring** – search for releases meeting minimum custom format scores
137
+ - **Overseerr/Ombi integration** – auto-pull and prioritize user requests from request management tools
138
+ - **Smart search modes** – series-level or episode-level search for TV shows based on context
139
+ - **Temporary quality profiles** – use lower quality profiles for missing items, upgrade later with flexible mapping
140
+
141
+ ### πŸ“Š Quality & Metadata Management
142
+ - **RSS sync automation** – schedule periodic RSS feed refreshes across all Arr instances
143
+ - **Queue management** – auto-refresh download queues to keep Arr instances in sync
144
+ - **Custom format enforcement** – automatically remove torrents not meeting minimum CF scores
145
+ - **Quality profile switching** – dynamically change profiles for missing vs. upgrade searches with per-profile mapping
146
+ - **Interactive profile configuration** – test Arr connections and select quality profiles from dropdowns in WebUI
147
+ - **Auto-reset profiles** – force reset temp profiles on startup or after configurable timeouts
148
+ - **Year-based search ordering** – prioritize searches by release date (newest first or reverse)
149
+
150
+ ### 🌱 Seeding & Tracker Control
151
+ - **Per-tracker settings** – configure MaxETA, ratios, seeding time per tracker
152
+ - **Global seeding limits** – set upload/download rate limits, max ratios, and seeding times
153
+ - **Automatic removal** – remove torrents based on ratio, time, or both
154
+ - **Dead tracker cleanup** – auto-remove trackers with specific error messages
155
+ - **Tracker injection** – add missing trackers or remove existing ones per torrent
156
+ - **Super seed mode** – enable super seeding for specific trackers
157
+ - **Tag management** – auto-tag torrents by tracker or custom rules
158
+
159
+ ### πŸ’Ύ Disk Space & Resource Management
160
+ - **Free space monitoring** – pause all torrents when disk space falls below threshold
161
+ - **Auto pause/resume** – intelligently manage torrent activity based on disk availability
162
+ - **Configurable thresholds** – set limits in KB, MB, GB, or TB
163
+ - **Path-specific monitoring** – watch specific directories for space issues
164
+
165
+ ### πŸ”„ Auto-Updates & Self-Healing
166
+ - **GitHub release-based updates** – automatically checks for published (non-draft) releases via GitHub API
167
+ - **Scheduled auto-updates** – update qBitrr on a cron schedule (default: weekly Sunday 3 AM)
168
+ - **Manual update trigger** – one-click updates from WebUI
169
+ - **Installation-aware updates** – detects git/pip/binary installs and uses appropriate update method
170
+ - **Version verification** – confirms installed version matches target before restart
171
+ - **Smart restart mechanism** – uses `os.execv()` for true in-place restarts (no supervisor needed)
172
+ - **Cross-platform compatibility** – works in Docker, systemd, native installs, Windows, Linux, macOS
173
+ - **Graceful shutdown** – cleanly closes databases, flushes logs, terminates child processes
174
+ - **Process auto-restart** – automatically restarts crashed Arr manager processes with crash loop protection
175
+ - **Crash loop detection** – prevents infinite restart loops with configurable max restart limits and time windows
176
+ - **Configurable restart behavior** – control restart delays, maximum attempts, and monitoring windows via WebUI
177
+
178
+ ### πŸ’» First-Party Web UI
179
+ - **Live process monitoring** – see all running Arr managers and their current activity
180
+ - **Log viewer** – tail logs in real-time with filtering and search
181
+ - **Arr insights** – view movies, series, albums with filtering by year, quality, status, and quality profiles
182
+ - **Config editor** – edit configuration directly from the UI with validation and helpful tooltips
183
+ - **Test connections** – validate Arr credentials and load quality profiles with one click
184
+ - **Restart controls** – restart individual processes or the entire application
185
+ - **Dark/light theme** – customizable UI appearance
186
+ - **Token authentication** – optional API protection with bearer tokens
187
+
188
+ ## πŸ“Œ State of the Project
189
+ The long-term plan is still to ship a C# rewrite, but the Python edition isn't going anywhereβ€”it gets regular fixes and features, and the Web UI is now production-ready. Ideas and PRs are welcome! Head over to the [issue templates](.github/ISSUE_TEMPLATE) or the [PR checklist](.github/pull_request_template.md) to get started.
190
+
191
+
192
+
193
+ ## ⚑ Quickstart
194
+ qBitrr supports Python 3.12+ on Linux, macOS, and Windows. Run it natively or in Dockerβ€”whatever fits your stack.
195
+
196
+ ### 🐍 Install with pip
197
+ ```bash
198
+ python -m venv .venv
199
+ source .venv/bin/activate # Windows: .venv\Scripts\activate
200
+ python -m pip install --upgrade pip
201
+ python -m pip install qBitrr2
202
+
203
+ # First run creates ~/config/config.toml
204
+ qBitrr2
205
+ ```
206
+
207
+ **Update later:**
208
+ ```bash
209
+ python -m pip install --upgrade qBitrr2
210
+ ```
211
+
212
+ **Or enable auto-updates** in `config.toml`:
213
+ ```toml
214
+ [Settings]
215
+ AutoUpdateEnabled = true
216
+ AutoUpdateCron = "0 3 * * 0" # Weekly on Sunday at 3 AM
217
+ ```
218
+
219
+ > πŸ“ **Note:** Auto-updates check GitHub releases for new versions. Only published (non-draft) releases trigger updates. Binary installations receive update notifications but require manual download.
220
+
221
+ ### 🐳 Run with Docker
222
+ **Minimal setup:**
223
+ ```bash
224
+ docker run -d \
225
+ --name qbitrr \
226
+ --tty \
227
+ -e TZ=Europe/London \
228
+ -p 6969:6969 \
229
+ -v /etc/localtime:/etc/localtime:ro \
230
+ -v /path/to/appdata/qbitrr:/config \
231
+ -v /path/to/completed/downloads:/completed_downloads:rw \
232
+ --restart unless-stopped \
233
+ feramance/qbitrr:latest
234
+ ```
235
+
236
+ The container automatically binds its WebUI to `0.0.0.0`; exposing `6969` makes the dashboard reachable at `http://<host>:6969/ui`.
237
+
238
+ **Docker Compose example:**
239
+ ```yaml
240
+ services:
241
+ qbitrr:
242
+ image: feramance/qbitrr:latest
243
+ container_name: qbitrr
244
+ user: 1000:1000
245
+ restart: unless-stopped
246
+ tty: true
247
+ environment:
248
+ TZ: Europe/London
249
+ ports:
250
+ - "6969:6969"
251
+ volumes:
252
+ - /etc/localtime:/etc/localtime:ro
253
+ - /path/to/appdata/qbitrr:/config
254
+ - /path/to/completed/downloads:/completed_downloads:rw
255
+ logging:
256
+ driver: json-file
257
+ options:
258
+ max-size: 50m
259
+ max-file: "3"
260
+ depends_on:
261
+ - qbittorrent
262
+ - radarr
263
+ - sonarr
264
+ ```
265
+
266
+ > ℹ️ On first boot the container writes `config.toml` under `/config`. Update the values to match your mounts and restart the container.
267
+
268
+ ### βš™οΈ Native Systemd Service
269
+ For Linux users running qBitrr natively (non-Docker), you can set up automatic startup and restart management using systemd.
270
+
271
+ **Quick setup:**
272
+ ```bash
273
+ # Install qBitrr
274
+ pip install qBitrr2
275
+
276
+ # Copy systemd service file
277
+ sudo cp qbitrr.service /etc/systemd/system/qbitrr.service
278
+
279
+ # Enable and start
280
+ sudo systemctl enable qbitrr
281
+ sudo systemctl start qbitrr
282
+
283
+ # Check status
284
+ sudo systemctl status qbitrr
285
+ ```
286
+
287
+ **Benefits:**
288
+ - βœ… Auto-start on boot
289
+ - βœ… Automatic restarts after crashes or updates
290
+ - βœ… Integrated logging with `journalctl`
291
+ - βœ… Resource limits and security hardening
292
+ - βœ… Works seamlessly with qBitrr's auto-update feature
293
+
294
+ **See the full guide:** [SYSTEMD_SERVICE.md](SYSTEMD_SERVICE.md) for detailed setup instructions, troubleshooting, and security hardening options.
295
+
296
+ ## πŸ› οΈ Configuration
297
+
298
+ ### πŸ“‚ Config Location
299
+ - **Native install:** `~/config/config.toml`
300
+ - **Docker:** `/config/config.toml`
301
+ - **First run:** Auto-generates a template config file
302
+ - **Manual generation:** `qbitrr --gen-config`
303
+
304
+ ### πŸ”§ Essential Setup
305
+ 1. **Configure qBittorrent connection** in `[qBit]` section:
306
+ - Set `Host`, `Port`, `UserName`, `Password`
307
+ - qBittorrent 5.x requires `Version5 = true` (4.6.7 is the latest validated 4.x build)
308
+
309
+ 2. **Configure Arr instances** (Radarr/Sonarr/Lidarr):
310
+ - Each instance needs: `URI`, `APIKey`, `Category`
311
+ - **Naming format:** Instance names must follow pattern `(Radarr|Sonarr|Lidarr)-<name>` (e.g., `Radarr-Movies`, `Sonarr-TV4K`)
312
+ - **Important:** Use matching categories in Arr's download client settings
313
+ - **Tagging:** Ensure Arr instances tag their downloads so qBitrr can track them
314
+
315
+ 3. **Set completed download folder:**
316
+ ```toml
317
+ [Settings]
318
+ CompletedDownloadFolder = "/path/to/completed"
319
+ ```
320
+
321
+ 4. **Enable logging** for troubleshooting:
322
+ ```toml
323
+ [Settings]
324
+ Logging = true
325
+ ConsoleLevel = "INFO" # or DEBUG for verbose output
326
+ ```
327
+
328
+ ### πŸ“– Configuration Reference
329
+ See [`config.example.toml`](config.example.toml) for comprehensive documentation of all settings, including:
330
+ - Torrent health check thresholds
331
+ - Search automation options
332
+ - Seeding limits and tracker rules
333
+ - Request system integration
334
+ - WebUI settings
335
+ - File filtering and exclusion rules
336
+
337
+ ## 🎯 Feature Deep Dive
338
+
339
+ ### πŸš‘ Torrent Health Monitoring
340
+
341
+ qBitrr continuously monitors your torrents and takes intelligent action when problems arise.
342
+
343
+ **Stalled Torrent Detection:**
344
+ ```toml
345
+ [Radarr-Movies.Torrent]
346
+ StalledDelay = 15 # Minutes before considering a torrent stalled
347
+ ReSearchStalled = true # Re-search before removing stalled torrents
348
+ MaximumETA = 604800 # Max ETA in seconds (7 days)
349
+ IgnoreTorrentsYoungerThan = 600 # Grace period for new torrents (10 min)
350
+ ```
351
+
352
+ **Automatic Blacklisting:**
353
+ When torrents fail or stall beyond thresholds, qBitrr:
354
+ 1. βœ… Marks the release as failed in the Arr instance
355
+ 2. βœ… Blacklists the release to prevent re-download
356
+ 3. βœ… Optionally triggers an automatic re-search
357
+ 4. βœ… Removes the failed torrent from qBittorrent
358
+
359
+ **Smart Completion Rules:**
360
+ ```toml
361
+ [Radarr-Movies.Torrent]
362
+ MaximumDeletablePercentage = 0.99 # Don't delete torrents >99% complete
363
+ DoNotRemoveSlow = true # Protect slow but active torrents
364
+ ```
365
+
366
+ **File Verification:**
367
+ ```toml
368
+ [Settings]
369
+ FFprobeAutoUpdate = true # Auto-download FFprobe binary
370
+ ```
371
+ - Validates media files are playable before import
372
+ - Detects corrupted or fake files
373
+ - Prevents broken media from being imported into Arr
374
+
375
+ **Error Code Handling:**
376
+ ```toml
377
+ [Radarr-Movies]
378
+ ArrErrorCodesToBlocklist = [
379
+ "Not an upgrade for existing movie file(s)",
380
+ "Unable to determine if file is a sample"
381
+ ]
382
+ ```
383
+ Automatically handle specific Arr error messages by removing failed files and triggering re-searches.
384
+
385
+ ---
386
+
387
+ ### πŸ” Automated Search & Requests
388
+
389
+ **Missing Media Search:**
390
+ ```toml
391
+ [Radarr-Movies.EntrySearch]
392
+ SearchMissing = true # Enable automated searching
393
+ SearchLimit = 5 # Max concurrent searches
394
+ SearchByYear = true # Order by release year
395
+ SearchInReverse = false # Newest first (true = oldest first)
396
+ SearchRequestsEvery = 300 # Delay between searches (seconds)
397
+ SearchAgainOnSearchCompletion = true # Loop continuously
398
+ ```
399
+
400
+ **Quality Upgrade Search:**
401
+ ```toml
402
+ [Radarr-Movies.EntrySearch]
403
+ DoUpgradeSearch = true # Search for better quality versions
404
+ QualityUnmetSearch = true # Search for unmet quality profiles
405
+ CustomFormatUnmetSearch = true # Search for better custom format scores
406
+ ForceMinimumCustomFormat = true # Auto-remove torrents below CF threshold
407
+ ```
408
+
409
+ **Overseerr Integration:**
410
+ ```toml
411
+ [Radarr-Movies.EntrySearch.Overseerr]
412
+ SearchOverseerrRequests = true
413
+ OverseerrURI = "http://overseerr:5055"
414
+ OverseerrAPIKey = "your-api-key"
415
+ ApprovedOnly = true # Only process approved requests
416
+ Is4K = false # Set true for 4K Arr instances
417
+ ```
418
+
419
+ **Ombi Integration:**
420
+ ```toml
421
+ [Radarr-Movies.EntrySearch.Ombi]
422
+ SearchOmbiRequests = true
423
+ OmbiURI = "http://ombi:3579"
424
+ OmbiAPIKey = "your-api-key"
425
+ ApprovedOnly = true
426
+ ```
427
+
428
+ **Smart Search Modes (Sonarr):**
429
+ ```toml
430
+ [Sonarr-TV.EntrySearch]
431
+ SearchBySeries = "smart" # auto | true (series) | false (episode)
432
+ # smart: Series search for full seasons, episode search for singles
433
+ PrioritizeTodaysReleases = true # Search today's episodes first (RSS-like)
434
+ AlsoSearchSpecials = false # Include season 00 episodes
435
+ Unmonitored = false # Include unmonitored items
436
+ ```
437
+
438
+ **Temporary Quality Profiles:**
439
+ ```toml
440
+ [Radarr-Movies.EntrySearch]
441
+ UseTempForMissing = true
442
+ KeepTempProfile = false
443
+
444
+ # New: Map each main profile to a temp profile
445
+ QualityProfileMappings = { "Ultra-HD" = "Web-DL", "HD-1080p" = "HDTV-720p" }
446
+
447
+ # Auto-reset options
448
+ ForceResetTempProfiles = false # Reset all on startup
449
+ TempProfileResetTimeoutMinutes = 0 # Auto-reset after timeout (0 = disabled)
450
+ ProfileSwitchRetryAttempts = 3 # Retry failed profile switches
451
+
452
+ # Searches missing items with temp profile, switches back after import
453
+ ```
454
+
455
+ **Configure via WebUI:**
456
+ 1. Edit your Arr instance in the Config tab
457
+ 2. Click "Test Connection" to load available quality profiles
458
+ 3. Add profile mappings with the interactive UI (no JSON editing needed!)
459
+ 4. Select main and temp profiles from dropdowns
460
+ 5. Save and restart
461
+
462
+ ---
463
+
464
+ ### πŸ“Š Quality Management
465
+
466
+ **RSS Sync Automation:**
467
+ ```toml
468
+ [Radarr-Movies]
469
+ RssSyncTimer = 5 # Minutes between RSS feed refreshes (0 = disabled)
470
+ ```
471
+ Keeps Arr instances checking indexers for new releases regularly.
472
+
473
+ **Queue Refresh:**
474
+ ```toml
475
+ [Radarr-Movies]
476
+ RefreshDownloadsTimer = 5 # Minutes between queue updates (0 = disabled)
477
+ ```
478
+ Ensures Arr instances stay in sync with qBittorrent's download state.
479
+
480
+ **Import Mode:**
481
+ ```toml
482
+ [Radarr-Movies]
483
+ importMode = "Auto" # Auto | Move | Copy
484
+ ```
485
+ - **Auto:** Let Arr decide based on its settings
486
+ - **Move:** Move files from download folder to library
487
+ - **Copy:** Copy files (preserves seeding torrents)
488
+
489
+ **Custom Format Score Enforcement:**
490
+ When `ForceMinimumCustomFormat = true`, qBitrr automatically removes torrents that don't meet the minimum custom format score defined in your Arr quality profile.
491
+
492
+ ---
493
+
494
+ ### 🌱 Seeding & Tracker Control
495
+
496
+ **Global Seeding Limits:**
497
+ ```toml
498
+ [Radarr-Movies.Torrent.SeedingMode]
499
+ DownloadRateLimitPerTorrent = -1 # -1 = unlimited, or KB/s
500
+ UploadRateLimitPerTorrent = -1 # -1 = unlimited, or KB/s
501
+ MaxUploadRatio = 2.0 # Stop seeding at 2.0 ratio
502
+ MaxSeedingTime = 604800 # Stop after 7 days (seconds)
503
+ RemoveTorrent = 3 # 1=ratio, 2=time, 3=either, 4=both, -1=never
504
+ ```
505
+
506
+ **Per-Tracker Settings:**
507
+ ```toml
508
+ [[Radarr-Movies.Torrent.Trackers]]
509
+ Name = "MyTracker"
510
+ Priority = 10 # Higher = processed first
511
+ URI = "https://tracker.example/announce"
512
+ MaximumETA = 18000 # Override global MaxETA for this tracker
513
+ DownloadRateLimit = 5000 # KB/s limit for this tracker
514
+ UploadRateLimit = 1000 # KB/s limit for this tracker
515
+ MaxUploadRatio = 1.5 # Tracker-specific ratio limit
516
+ MaxSeedingTime = 86400 # Tracker-specific time limit (1 day)
517
+ AddTrackerIfMissing = true # Inject this tracker into matching torrents
518
+ RemoveIfExists = false # Remove this tracker if found
519
+ SuperSeedMode = true # Enable super seeding for this tracker
520
+ AddTags = ["private", "MyTracker"] # Auto-tag matching torrents
521
+ ```
522
+
523
+ **Tracker Cleanup:**
524
+ ```toml
525
+ [Radarr-Movies.Torrent.SeedingMode]
526
+ RemoveDeadTrackers = true
527
+ RemoveTrackerWithMessage = [
528
+ "skipping tracker announce (unreachable)",
529
+ "No such host is known",
530
+ "unsupported URL protocol"
531
+ ]
532
+ ```
533
+
534
+ **File Filtering:**
535
+ ```toml
536
+ [Radarr-Movies.Torrent]
537
+ CaseSensitiveMatches = false
538
+ FolderExclusionRegex = ["\\bextras?\\b", "\\bsamples?\\b", "\\bfeaturettes?\\b"]
539
+ FileNameExclusionRegex = ["\\bsample\\b", "\\btrailer\\b"]
540
+ FileExtensionAllowlist = [".mp4", ".mkv", ".avi", ".sub", ".srt"]
541
+ AutoDelete = false # Auto-delete non-playable files (.exe, .png, etc.)
542
+ ```
543
+
544
+ ---
545
+
546
+ ### πŸ’Ύ Disk Space Management
547
+
548
+ **Free Space Monitoring:**
549
+ ```toml
550
+ [Settings]
551
+ FreeSpace = "50G" # Pause when <50GB free (K/M/G/T units)
552
+ FreeSpaceFolder = "/downloads" # Path to monitor
553
+ AutoPauseResume = true # Required for FreeSpace to work
554
+ ```
555
+
556
+ **How it works:**
557
+ 1. πŸ“Š Continuously monitors specified folder
558
+ 2. ⏸️ Pauses **all** torrents when space falls below threshold
559
+ 3. ▢️ Auto-resumes when space is reclaimed
560
+ 4. πŸ”” Logs warnings when approaching limit
561
+
562
+ **Disable monitoring:**
563
+ ```toml
564
+ [Settings]
565
+ FreeSpace = "" # Empty string or 0 disables monitoring
566
+ ```
567
+
568
+ ---
569
+
570
+ ### πŸ”„ Auto-Updates & Restarts
571
+
572
+ qBitrr can automatically update itself by checking GitHub releases for new versions. The update behavior varies by installation type.
573
+
574
+ #### πŸ” How Updates Work
575
+
576
+ **Update Detection:**
577
+ 1. πŸ“‘ Queries GitHub API for latest **published** (non-draft) release
578
+ 2. πŸ”’ Compares release version with current version using semantic versioning
579
+ 3. ⏩ Skips prereleases (beta, rc, alpha) by default
580
+ 4. πŸ“¦ Only updates when a newer **stable** version is available
581
+
582
+ **Installation Types:**
583
+
584
+ | Type | Detection | Update Method | Version Control |
585
+ |------|-----------|---------------|-----------------|
586
+ | **Git** | `.git` directory exists | `git checkout <tag>` or `git pull` | Checks out specific release tag |
587
+ | **PyPI** | Installed via pip | `pip install qBitrr2==<version>` | Installs exact version from PyPI |
588
+ | **Binary** | PyInstaller executable | Notification only | Logs download URL for manual update |
589
+
590
+ **Why different methods?**
591
+ - **Git installations** can checkout specific tags for precise version control
592
+ - **PyPI installations** can pin to exact versions for reliability
593
+ - **Binary installations** cannot self-update (would require replacing running executable), so qBitrr logs the download URL and version info for manual update
594
+
595
+ ---
596
+
597
+ #### βš™οΈ Configuration
598
+
599
+ **Basic Setup:**
600
+ ```toml
601
+ [Settings]
602
+ AutoUpdateEnabled = true
603
+ AutoUpdateCron = "0 3 * * 0" # Cron expression (default: Sunday 3 AM)
604
+ ```
605
+
606
+ **Cron Expression Examples:**
607
+ ```bash
608
+ 0 3 * * 0 # Every Sunday at 3:00 AM
609
+ 0 */6 * * * # Every 6 hours
610
+ 0 0 * * * # Daily at midnight
611
+ 0 2 * * 1-5 # Weekdays at 2:00 AM
612
+ ```
613
+
614
+ ---
615
+
616
+ #### πŸ“‹ Update Process Flow
617
+
618
+ **For Git & PyPI Installations:**
619
+
620
+ 1. **Check Phase:**
621
+ - Fetch latest release from GitHub API
622
+ - Validate release is not draft or prerelease
623
+ - Compare versions (semantic versioning)
624
+ - Skip if already on latest version
625
+
626
+ 2. **Download Phase:**
627
+ - **Git:** `git fetch --tags && git checkout v<version>`
628
+ - **PyPI:** `pip install --upgrade qBitrr2==<version>`
629
+
630
+ 3. **Verification Phase:**
631
+ - Reload version information
632
+ - Verify installed version matches target
633
+ - Log warning if mismatch
634
+
635
+ 4. **Restart Phase:**
636
+ - Gracefully shutdown (close DBs, flush logs)
637
+ - Terminate child processes
638
+ - Execute in-place restart via `os.execv()`
639
+ - Maintain same PID (systemd-friendly)
640
+
641
+ **For Binary Installations:**
642
+
643
+ 1. **Check Phase:** Same as above
644
+ 2. **Notification:** Logs message with download URL and instructions
645
+ 3. **Manual Update:** User downloads new binary from GitHub releases
646
+ 4. **No Auto-Restart:** User manually restarts after replacing binary
647
+
648
+ Example binary update log:
649
+ ```
650
+ [INFO] Update available: v5.4.2 -> v5.4.3
651
+ [INFO] Binary installation detected - manual update required
652
+ [INFO] Download: https://github.com/Feramance/qBitrr/releases/latest
653
+ [INFO] Instructions:
654
+ 1. Download the binary for your platform
655
+ 2. Extract the archive
656
+ 3. Replace current executable with new binary
657
+ 4. Restart qBitrr
658
+ ```
659
+
660
+ ---
661
+
662
+ #### πŸ”§ Manual Updates
663
+
664
+ **Via WebUI:**
665
+ - Navigate to **Config tab**
666
+ - Click **"Check for Updates"** to see available version
667
+ - Click **"Update Now"** button
668
+ - Confirm when prompted
669
+ - Application restarts automatically (git/pip only)
670
+
671
+ **Via Command Line:**
672
+
673
+ ```bash
674
+ # Git installation
675
+ cd /path/to/qBitrr
676
+ git fetch --tags
677
+ git checkout v5.4.3 # or: git pull
678
+ qbitrr # restart
679
+
680
+ # PyPI installation
681
+ pip install --upgrade qBitrr2
682
+ # or: pip install qBitrr2==5.4.3 # specific version
683
+ qbitrr # restart
684
+
685
+ # Binary installation
686
+ # Download from: https://github.com/Feramance/qBitrr/releases/latest
687
+ # Extract and replace binary, then restart
688
+
689
+ # Docker installation
690
+ docker pull feramance/qbitrr:latest
691
+ docker restart qbitrr
692
+ # or: docker-compose pull && docker-compose up -d
693
+ ```
694
+
695
+ ---
696
+
697
+ #### πŸ” Security & Reliability
698
+
699
+ **GitHub API Dependency:**
700
+ - Auto-update requires GitHub API access
701
+ - Rate limit: 60 requests/hour (unauthenticated)
702
+ - Cron schedule should account for rate limits
703
+ - Failures are logged but don't crash the application
704
+
705
+ **Version Verification:**
706
+ - After update, qBitrr verifies installed version
707
+ - Helps catch failed updates or PyPI lag issues
708
+ - Logs warning if version mismatch detected
709
+
710
+ **Draft & Prerelease Handling:**
711
+ - Draft releases are **always skipped** (unpublished)
712
+ - Prereleases (beta/rc/alpha) are skipped by default
713
+ - Useful for testing but not recommended for production
714
+
715
+ **Rollback:**
716
+ - Git installations: `git checkout <previous-tag>`
717
+ - PyPI installations: `pip install qBitrr2==<previous-version>`
718
+ - Binary installations: Keep backup of previous binary
719
+ - No automatic rollback (manual intervention required)
720
+
721
+ ---
722
+
723
+ #### πŸš€ Restart Mechanism
724
+
725
+ **How it Works:**
726
+ ```python
727
+ os.execv(sys.executable, [sys.executable] + sys.argv)
728
+ ```
729
+
730
+ **Benefits:**
731
+ - βœ… **Same PID** – systemd doesn't detect a restart
732
+ - βœ… **No supervisor** – doesn't require external process manager
733
+ - βœ… **Clean state** – fresh Python interpreter, no memory leaks
734
+ - βœ… **Fast** – near-instant restart (< 1 second)
735
+
736
+ **Supported Environments:**
737
+ - 🐳 **Docker** – container stays running, process restarts
738
+ - βš™οΈ **systemd** – service remains "active", no restart count increment
739
+ - πŸ’» **Native** – works on Linux, macOS, Windows
740
+ - πŸͺŸ **Windows** – handles different executable extensions (.exe, .cmd)
741
+
742
+ **Graceful Shutdown:**
743
+ 1. Stop all Arr manager child processes
744
+ 2. Close database connections
745
+ 3. Flush log buffers to disk
746
+ 4. Release file locks
747
+ 5. Execute in-place restart
748
+
749
+ ---
750
+
751
+ #### πŸ› οΈ Restart via API
752
+
753
+ **Restart entire application:**
754
+ ```bash
755
+ curl -X POST http://localhost:6969/api/restart
756
+
757
+ # With authentication
758
+ curl -X POST http://localhost:6969/api/restart \
759
+ -H "Authorization: Bearer your-token"
760
+ ```
761
+
762
+ **Restart specific Arr manager:**
763
+ ```bash
764
+ curl -X POST http://localhost:6969/api/arr/radarr-movies/restart
765
+ ```
766
+
767
+ ---
768
+
769
+ #### ⚠️ Troubleshooting Updates
770
+
771
+ **Update not triggering:**
772
+ - βœ… Check `AutoUpdateEnabled = true` in config
773
+ - βœ… Verify cron expression is valid (use [crontab.guru](https://crontab.guru))
774
+ - βœ… Check `Main.log` for GitHub API errors
775
+ - βœ… Ensure internet connectivity to api.github.com
776
+ - βœ… Check if already on latest version
777
+
778
+ **Version mismatch after update:**
779
+ - βœ… Review logs for pip/git errors
780
+ - βœ… Manually verify installation: `pip show qBitrr2` or `git describe`
781
+ - βœ… Check if PyPI is behind GitHub releases (can take hours)
782
+ - βœ… Try manual update to force correct version
783
+
784
+ **Binary updates not working:**
785
+ - ℹ️ **Expected behavior** – binaries cannot auto-update
786
+ - βœ… Check logs for download URL
787
+ - βœ… Download matching binary for your platform
788
+ - βœ… Extract and replace current executable
789
+ - βœ… Ensure new binary has execute permissions (Unix)
790
+
791
+ **Restart fails:**
792
+ - βœ… Check file permissions on qBitrr installation
793
+ - βœ… Review systemd journal if using systemd
794
+ - βœ… Verify no file locks preventing restart
795
+ - βœ… Check disk space for logs and databases
796
+ - βœ… Manual restart: Stop service, start again
797
+
798
+ **For systemd users:** See [SYSTEMD_SERVICE.md](SYSTEMD_SERVICE.md) for automatic restart configuration with `Restart=always`.
799
+
800
+ ---
801
+
802
+ curl -X POST http://localhost:6969/api/arr/radarr-movies/restart
803
+ ```
804
+
805
+ **For systemd users:** See [SYSTEMD_SERVICE.md](SYSTEMD_SERVICE.md) for automatic restart configuration.
806
+
807
+ ---
808
+
809
+ ### πŸ” Process Auto-Restart & Crash Loop Protection
810
+
811
+ Your Arr manager processes (Radarr/Sonarr/Lidarr) automatically restart if they crash, preventing downtime. Built-in protection stops restart loops if a process keeps failing.
812
+
813
+ #### βš™οΈ Configuration
814
+
815
+ **Basic Setup:**
816
+ ```toml
817
+ [Settings]
818
+ AutoRestartProcesses = true # Enable automatic restart
819
+ MaxProcessRestarts = 5 # Stop trying after 5 crashes
820
+ ProcessRestartWindow = 300 # Within 5 minutes
821
+ ProcessRestartDelay = 5 # Wait 5 seconds before restarting
822
+ ```
823
+
824
+ **What this means:**
825
+ - If a process crashes fewer than 5 times in 5 minutes, it auto-restarts
826
+ - If it crashes 5+ times in 5 minutes, qBitrr stops trying and logs an error
827
+ - After the 5-minute window passes, the counter resets and auto-restart resumes
828
+
829
+ **Configure via WebUI:**
830
+ 1. Navigate to **Config** tab
831
+ 2. Find the **Process Management** section
832
+ 3. Adjust restart behavior to your preference
833
+ 4. Save and restart qBitrr
834
+
835
+ #### πŸ“Š Monitoring
836
+
837
+ **Via WebUI:**
838
+ - **Processes tab** shows all running managers with restart history
839
+ - Manually restart individual processes if needed
840
+
841
+ **Via Logs:**
842
+ ```bash
843
+ # See restart activity
844
+ tail -f ~/logs/Main.log | grep restart # Native
845
+ docker logs -f qbitrr | grep restart # Docker
846
+ sudo journalctl -u qbitrr -f | grep restart # Systemd
847
+ ```
848
+
849
+ #### πŸ†• First-Time Setup
850
+
851
+ Existing configs automatically upgrade to version 3 on first startup. A timestamped backup is created before any changes. No manual action needed!
852
+
853
+ ---
854
+
855
+ ## πŸ–₯️ Built-in Web UI
856
+ The React + Vite dashboard provides complete visibility and control over your qBitrr instance.
857
+
858
+ ### 🌐 Access & Authentication
859
+ - **Default URL:** `http://<host>:6969/ui`
860
+ - **Custom host/port:** Configure in `config.toml`:
861
+ ```toml
862
+ [WebUI]
863
+ Host = "0.0.0.0" # Bind address (0.0.0.0 for all interfaces)
864
+ Port = 6969 # Web server port
865
+ ```
866
+ - **Authentication:** Protect API endpoints with bearer token:
867
+ ```toml
868
+ [WebUI]
869
+ Token = "your-secret-token"
870
+ ```
871
+ When set, all `/api/*` endpoints require `Authorization: Bearer <token>` header.
872
+ The UI itself uses unauthenticated `/web/*` endpoints.
873
+
874
+ ### πŸ—‚οΈ Dashboard Tabs
875
+
876
+ **πŸ“Š Processes Tab:**
877
+ - View all running Arr manager processes
878
+ - See current activity and search status
879
+ - Monitor queue counts and metrics
880
+ - Restart individual processes or all at once
881
+
882
+ **πŸ“ Logs Tab:**
883
+ - Real-time log viewer with filtering
884
+ - View `Main.log`, `WebUI.log`, and per-Arr logs
885
+ - Search and navigate large log files
886
+ - Download logs for troubleshooting
887
+
888
+ **🎬 Radarr/Sonarr/Lidarr Tabs:**
889
+ - Browse your media library with advanced filtering
890
+ - Filter by year range, quality status, monitored state
891
+ - See custom format scores and upgrade availability
892
+ - Identify missing media and quality issues
893
+ - View request status for Overseerr/Ombi items
894
+
895
+ **βš™οΈ Config Tab:**
896
+ - Edit configuration directly in the UI
897
+ - Trigger manual updates
898
+ - View version and changelog
899
+ - Rebuild Arr metadata
900
+ - Restart application
901
+
902
+ ### 🎨 Customization
903
+ ```toml
904
+ [WebUI]
905
+ Theme = "dark" # or "light"
906
+ LiveArr = true # Enable live updates for Arr views
907
+ GroupSonarr = true # Group episodes by series
908
+ GroupLidarr = true # Group albums by artist
909
+ ```
910
+
911
+ ### πŸ§ͺ Development
912
+ The WebUI source lives in `webui/`:
913
+ ```bash
914
+ cd webui
915
+ npm ci # Install dependencies
916
+ npm run dev # Dev server with HMR at localhost:5173
917
+ npm run lint # ESLint check
918
+ npm run build # Build for production
919
+ ```
920
+ Build outputs to `webui/dist/`, which gets bundled into `qBitrr/static/`.
921
+
922
+ **API Documentation:** See [API_DOCUMENTATION.md](API_DOCUMENTATION.md) for complete API reference.
923
+
924
+ ---
925
+
926
+ ## πŸ” Day-to-day Operations
927
+
928
+ ### πŸ”„ Restart & Rebuild
929
+ - **Restart application:** WebUI β†’ Config tab β†’ "Restart All" button
930
+ - **Restart individual Arr manager:** WebUI β†’ Processes tab β†’ Click restart icon
931
+ - **Rebuild Arr metadata:** WebUI β†’ Config tab β†’ "Rebuild Arrs" button
932
+ - **API endpoints:**
933
+ ```bash
934
+ POST /api/restart # Restart qBitrr
935
+ POST /api/arr/<category>/restart # Restart specific manager
936
+ POST /api/arr/rebuild # Rebuild all Arr caches
937
+ ```
938
+
939
+ ### πŸ“‹ Monitoring
940
+ - **Logs location:** `~/logs/` (native) or `/config/logs` (Docker)
941
+ - **Log files:**
942
+ - `Main.log` – Main application logs
943
+ - `WebUI.log` – Web interface logs
944
+ - `<CategoryName>.log` – Per-Arr instance logs
945
+ - **View in UI:** WebUI β†’ Logs tab β†’ Select log file
946
+ - **View in terminal:**
947
+ ```bash
948
+ # Native
949
+ tail -f ~/logs/Main.log
950
+
951
+ # Docker
952
+ docker logs -f qbitrr
953
+ docker exec qbitrr tail -f /config/logs/Main.log
954
+
955
+ # Systemd
956
+ sudo journalctl -u qbitrr -f
957
+ ```
958
+
959
+ ### πŸ” Request Integration
960
+ Once configured, qBitrr automatically:
961
+ 1. πŸ“₯ Polls Overseerr/Ombi for new requests
962
+ 2. πŸ” Searches requested items in Arr instances
963
+ 3. ⭐ Prioritizes requests over general missing media searches
964
+ 4. πŸ“Š Identifies requests in WebUI Arr tabs with `isRequest` flag
965
+
966
+ ### πŸ› οΈ Special Categories
967
+ qBitrr monitors special qBittorrent categories for manual intervention:
968
+
969
+ **Failed Category:**
970
+ ```toml
971
+ [Settings]
972
+ FailedCategory = "failed"
973
+ ```
974
+ Manually move torrents here to mark them as failed and trigger blacklisting + re-search.
975
+
976
+ **Recheck Category:**
977
+ ```toml
978
+ [Settings]
979
+ RecheckCategory = "recheck"
980
+ ```
981
+ Manually move torrents here to trigger a proper recheck operation.
982
+
983
+ ### 🏷️ Tagless Operation
984
+ ```toml
985
+ [Settings]
986
+ Tagless = true
987
+ ```
988
+ Disables qBitrr from tagging torrents in qBittorrent. Use this if you prefer to manage qBittorrent tags manually or avoid tag clutter.
989
+
990
+ ---
991
+
992
+ ## πŸ†˜ Troubleshooting
993
+
994
+ ### πŸ› Common Issues
995
+
996
+ **Torrents not being processed:**
997
+ 1. βœ… Verify Arr instance is using the correct **category** in download client settings
998
+ 2. βœ… Ensure Arr instance **tags** match qBitrr's category configuration
999
+ 3. βœ… Check `IgnoreTorrentsYoungerThan` – new torrents have a grace period
1000
+ 4. βœ… Enable debug logging: `ConsoleLevel = "DEBUG"`
1001
+ 5. βœ… Check category-specific log file in `~/logs/` or `/config/logs/`
1002
+
1003
+ **Imports not triggering:**
1004
+ 1. βœ… Verify `CompletedDownloadFolder` path is correct and accessible
1005
+ 2. βœ… Check file extensions against `FileExtensionAllowlist`
1006
+ 3. βœ… Review `FolderExclusionRegex` and `FileNameExclusionRegex` for over-matching
1007
+ 4. βœ… Enable FFprobe logging to see media validation results
1008
+ 5. βœ… Check Arr instance has proper path mappings (especially in Docker)
1009
+
1010
+ **Search not finding releases:**
1011
+ 1. βœ… Verify `SearchMissing = true` in the EntrySearch section
1012
+ 2. βœ… Check `SearchLimit` isn't too low for your queue
1013
+ 3. βœ… Review `SearchByYear` and `SearchInReverse` settings
1014
+ 4. βœ… Ensure Arr instance has indexers configured and working
1015
+ 5. βœ… Check for rate limiting in Arr instance logs
1016
+
1017
+ **High CPU/memory usage:**
1018
+ 1. βœ… Reduce `SearchLimit` to lower concurrent searches
1019
+ 2. βœ… Increase `LoopSleepTimer` to slow down processing
1020
+ 3. βœ… Disable `DoUpgradeSearch` if not needed
1021
+ 4. βœ… Set `LiveArr = false` in WebUI config to reduce refresh overhead
1022
+
1023
+ **Docker path issues:**
1024
+ 1. βœ… Ensure volume mounts match between qBittorrent, Arr, and qBitrr
1025
+ 2. βœ… Use consistent paths across all containers
1026
+ 3. βœ… Example: All containers should see `/downloads` as the same physical path
1027
+
1028
+ **Updates failing:**
1029
+ 1. βœ… Check internet connectivity
1030
+ 2. βœ… Verify pip/Python installation is writable
1031
+ 3. βœ… Review update logs in `Main.log` or `WebUI.log`
1032
+ 4. βœ… Manual update: `pip install --upgrade qBitrr2` (native) or pull new Docker image
1033
+
1034
+ ### πŸ“Š Enable Debug Logging
1035
+ ```toml
1036
+ [Settings]
1037
+ Logging = true
1038
+ ConsoleLevel = "DEBUG" # TRACE for even more detail
1039
+ ```
1040
+ Logs output to:
1041
+ - **Native:** `~/logs/`
1042
+ - **Docker:** `/config/logs/`
1043
+ - **Systemd:** `sudo journalctl -u qbitrr -n 100`
1044
+
1045
+ ### 🐞 Reporting Issues
1046
+ When reporting bugs:
1047
+
1048
+ 1. **Enable file logging** and reproduce the issue
1049
+ 2. **Collect information:**
1050
+ - qBitrr version: `qBitrr2 --version` or Docker tag
1051
+ - OS and deployment method (Docker/native/systemd)
1052
+ - qBittorrent version and API version (4.x vs 5.x)
1053
+ - Arr instance versions (Radarr/Sonarr/Lidarr)
1054
+ - Request tool versions (Overseerr/Ombi) if applicable
1055
+ 3. **Grab relevant log snippets** (scrub API keys and tokens!)
1056
+ 4. **Open an issue** using the [bug report template](.github/ISSUE_TEMPLATE/bug_report.yml)
1057
+ 5. **Include:**
1058
+ - Clear reproduction steps
1059
+ - Expected vs. actual behavior
1060
+ - Relevant config sections (with secrets removed)
1061
+ - Error messages and stack traces
1062
+
1063
+ ### πŸ’‘ Feature Requests
1064
+ Have an idea? Submit it via the [feature request template](.github/ISSUE_TEMPLATE/feature_request.yml)!
1065
+
1066
+ ### πŸ“š Additional Resources
1067
+ - **API Documentation:** [API_DOCUMENTATION.md](API_DOCUMENTATION.md)
1068
+ - **Systemd Setup:** [SYSTEMD_SERVICE.md](SYSTEMD_SERVICE.md)
1069
+ - **Example Config:** [config.example.toml](config.example.toml)
1070
+ - **GitHub Issues:** [Search existing issues](https://github.com/Feramance/qBitrr/issues)
1071
+
1072
+ ---
1073
+
1074
+ ## 🀝 Contributing
1075
+
1076
+ We welcome contributions from the community! Whether it's code, documentation, bug reports, or feature ideas, your help makes qBitrr better.
1077
+
1078
+ ### πŸ”§ Development Setup
1079
+
1080
+ **Python Backend:**
1081
+ ```bash
1082
+ # Clone the repo
1083
+ git clone https://github.com/Feramance/qBitrr.git
1084
+ cd qBitrr
1085
+
1086
+ # Create virtual environment
1087
+ make newenv
1088
+ # or: python -m venv .venv && source .venv/bin/activate
1089
+
1090
+ # Install dependencies
1091
+ make syncenv
1092
+ # or: pip install -e .[all]
1093
+
1094
+ # Run linting and formatting
1095
+ make reformat
1096
+ # or: pre-commit run --all-files
1097
+ ```
1098
+
1099
+ **TypeScript/React WebUI:**
1100
+ ```bash
1101
+ cd webui
1102
+ npm ci # Install exact versions from package-lock.json
1103
+ npm run dev # Dev server at localhost:5173
1104
+ npm run lint # ESLint check
1105
+ npm run build # Build for production
1106
+ ```
1107
+
1108
+ ### πŸ“ Before Submitting a PR
1109
+
1110
+ 1. βœ… Read the [pull request template](.github/pull_request_template.md)
1111
+ 2. βœ… **Format code:**
1112
+ - Python: `make reformat` or `pre-commit run --all-files`
1113
+ - TypeScript: `npm run lint` in `webui/`
1114
+ 3. βœ… **Test your changes:**
1115
+ - Run against live qBittorrent + Arr instances
1116
+ - Test in both Docker and native environments if possible
1117
+ 4. βœ… **Update documentation:**
1118
+ - Add/update relevant sections in README.md
1119
+ - Update `config.example.toml` if adding config options
1120
+ - Document API changes in `API_DOCUMENTATION.md`
1121
+ 5. βœ… **Clean commit history:**
1122
+ - Use descriptive commit messages
1123
+ - Follow [conventional commits](https://www.conventionalcommits.org/) format
1124
+ - Squash WIP commits before submitting
1125
+
1126
+ ### πŸ’‘ Contribution Ideas
1127
+
1128
+ - πŸ› **Bug fixes** – check [open issues](https://github.com/Feramance/qBitrr/issues)
1129
+ - ✨ **Features** – see [feature requests](https://github.com/Feramance/qBitrr/labels/enhancement)
1130
+ - πŸ“š **Documentation** – improve guides, add examples, fix typos
1131
+ - 🌍 **Translations** – help internationalize the WebUI
1132
+ - πŸ§ͺ **Testing** – add test coverage, validate edge cases
1133
+
1134
+ **Unsure if an idea fits?** Open a [feature request](.github/ISSUE_TEMPLATE/feature_request.yml) first and let's discuss!
1135
+
1136
+ ### πŸ“œ Code Guidelines
1137
+
1138
+ See [CONTRIBUTION.md](CONTRIBUTION.md) for comprehensive coding standards and architecture details.
1139
+
1140
+ **Quick summary:**
1141
+ - **Python:** Black formatting (99 chars), type hints required, PEP 8 naming
1142
+ - **TypeScript:** ESLint strict mode, explicit types, functional components only
1143
+ - **Commits:** LF line endings, no trailing whitespace, EOF newline required
1144
+ - **Errors:** Inherit from `qBitManagerError`, provide actionable messages
1145
+
1146
+ ---
1147
+
1148
+ ## ❀️ Support
1149
+
1150
+ ### 🌟 Show Your Support
1151
+ - ⭐ **Star the repo** – helps others discover qBitrr
1152
+ - πŸ› **Report bugs** – attach logs so we can fix issues faster
1153
+ - πŸ’¬ **Share feedback** – tell us what works and what doesn't
1154
+ - πŸ› οΈ **Contribute** – code, docs, translations, or just good vibes
1155
+
1156
+ ### πŸ’° Sponsor Development
1157
+ If qBitrr saves you time and headaches, consider supporting its development:
1158
+
1159
+ - 🎨 [Patreon](https://patreon.com/qBitrr) – monthly support
1160
+ - πŸ’Έ [PayPal](https://www.paypal.me/feramance) – one-time donations
1161
+
1162
+ Your support keeps qBitrr maintained, updated, and improving. Thank you! πŸ™
1163
+
1164
+ ---
1165
+
1166
+ ## πŸ“„ License
1167
+
1168
+ qBitrr is released under the [MIT License](LICENSE).
1169
+
1170
+ **TL;DR:** Use it, modify it, share itβ€”commercially or personally. Just keep the copyright notice and don't blame us if things break. 😊
1171
+
1172
+ ---
1173
+
1174
+ ## πŸ”— Quick Links
1175
+
1176
+ - πŸ“¦ [PyPI Package](https://pypi.org/project/qBitrr2/)
1177
+ - 🐳 [Docker Hub](https://hub.docker.com/r/feramance/qbitrr)
1178
+ - πŸ“š [API Documentation](API_DOCUMENTATION.md)
1179
+ - βš™οΈ [Systemd Setup Guide](SYSTEMD_SERVICE.md)
1180
+ - πŸ“ [Example Configuration](config.example.toml)
1181
+ - πŸ› [Report a Bug](.github/ISSUE_TEMPLATE/bug_report.yml)
1182
+ - ✨ [Request a Feature](.github/ISSUE_TEMPLATE/feature_request.yml)
1183
+ - πŸ’¬ [Discussions](https://github.com/Feramance/qBitrr/discussions)
1184
+
1185
+ ---
1186
+
1187
+ <div align="center">
1188
+
1189
+ **Made with ❀️ by the qBitrr community**
1190
+
1191
+ </div>