All apps · 0 apps
binhex-official-qbit-guard
Docker app from Binhex's Repository
Overview
Readme
View on GitHub
qbit-guard
A zero-dependency Python guard for qBittorrent that blocks pre-air TV episodes (Sonarr) and unreleased movies (Radarr), deletes ISO/BDMV-only torrents, and auto-blocklists bad releases in Sonarr/Radarr (with dedupe + queue failover). Runs on "torrent added", fetches metadata safely, and logs everything to stdout.
Documentation
The full documentation has moved to: https://gengines.github.io/qbit-guard/
Please visit our GitHub Pages site for comprehensive documentation including:
- Installation instructions
- Configuration options
- Docker deployment guides
- Usage examples
- Troubleshooting tips
Quick Links
- Documentation: https://gengines.github.io/qbit-guard/
- Docker Image:
ghcr.io/gengines/qbit-guard:<tag> - UNRAID: Available in Community Applications as "qbit-guard" (or via binhex's version)
- Repository: https://github.com/GEngines/qbit-guard
Key Features
- Pre-air gate (Sonarr): Stops new TV torrents, checks airDateUtc with configurable grace periods
- Pre-air gate (Radarr): Stops new movie torrents, checks release dates with configurable grace periods
- Extension policy: Allow/Block by file extension with configurable strategies
- ISO/BDMV cleaner: Removes disc-image-only torrents that lack keepable video content
- Smart blocklisting: Blocklists in Sonarr/Radarr before deletion using deduped history
- Internet cross-verification: Optional TVmaze and/or TheTVDB API integration
- Zero dependencies: No external libraries, just Python 3.8+ stdlib
- Container-friendly: All configuration via environment variables, logs to stdout
Install binhex-official-qbit-guard on Unraid in a few clicks.
Find binhex-official-qbit-guard in Community Apps on your Unraid server, review the template, and click Install. Unraid handles the Docker app or plugin setup from the published template.
Categories
Related apps
Explore more like this
Explore allDetails
ghcr.io/gengines/qbit-guardRuntime arguments
- Network
bridge- Shell
bash- Privileged
- false
Template configuration
qBittorrent WebUI URL
- Target
- QBIT_HOST
- Default
- http://127.0.0.1:8080
qBittorrent WebUI username
- Target
- QBIT_USER
- Default
- admin
qBittorrent WebUI password
- Target
- QBIT_PASS
- Default
- adminadmin
Comma-separated list of categories to process
- Target
- QBIT_ALLOWED_CATEGORIES
- Default
- radarr,tv-sonarr
Delete files when removing torrents
- Target
- QBIT_DELETE_FILES
- Default
- true|false
Set to 1 to ignore SSL certificate errors
- Target
- QBIT_IGNORE_TLS
- Default
- 0|1
Set to 1 for testing mode (no actual deletions)
- Target
- QBIT_DRY_RUN
- Default
- 0|1
How often to check qBittorrent for new torrents (seconds)
- Target
- WATCH_POLL_SECONDS
- Default
- 3.0
Process existing torrents when container starts (0 or 1)
- Target
- WATCH_PROCESS_EXISTING_AT_START
- Default
- 0|1
Keyword in category/tags to force reprocessing
- Target
- WATCH_RESCAN_KEYWORD
- Default
- rescan
Enable pre-air checking (0 or 1)
- Target
- ENABLE_PREAIR_CHECK
- Default
- 1|0
Sonarr base URL
- Target
- SONARR_URL
- Default
- http://127.0.0.1:8989
Sonarr API key
- Target
- SONARR_APIKEY
Categories to apply pre-air checks to
- Target
- SONARR_CATEGORIES
- Default
- tv-sonarr
Allow releases this many hours before air date
- Target
- EARLY_GRACE_HOURS
- Default
- 6
Block releases more than this many hours early
- Target
- EARLY_HARD_LIMIT_HOURS
- Default
- 72
Let whitelisted releases bypass hard limit (0 or 1)
- Target
- WHITELIST_OVERRIDES_HARD_LIMIT
- Default
- 0|1
Comma-separated list of trusted release groups
- Target
- EARLY_WHITELIST_GROUPS
Comma-separated list of trusted indexers
- Target
- EARLY_WHITELIST_INDEXERS
Comma-separated list of trusted trackers
- Target
- EARLY_WHITELIST_TRACKERS
Proceed if Sonarr history not found (0 or 1)
- Target
- RESUME_IF_NO_HISTORY
- Default
- 1|0
HTTP timeout for Sonarr API calls
- Target
- SONARR_TIMEOUT_SEC
- Default
- 45
Retry attempts for Sonarr operations
- Target
- SONARR_RETRIES
- Default
- 3
Radarr base URL
- Target
- RADARR_URL
- Default
- http://127.0.0.1:7878
Radarr API key
- Target
- RADARR_APIKEY
Categories to apply Radarr blocklisting to
- Target
- RADARR_CATEGORIES
- Default
- radarr
HTTP timeout for Radarr API calls
- Target
- RADARR_TIMEOUT_SEC
- Default
- 45
Retry attempts for Radarr operations
- Target
- RADARR_RETRIES
- Default
- 3
Provider selection: off, tvmaze, tvdb, or both
- Target
- INTERNET_CHECK_PROVIDER
- Default
- tvmaze|tvdb|both|off
TVmaze API base URL
- Target
- TVMAZE_BASE
- Default
- https://api.tvmaze.com
HTTP timeout for TVmaze API calls
- Target
- TVMAZE_TIMEOUT_SEC
- Default
- 8
TheTVDB API base URL
- Target
- TVDB_BASE
- Default
- https://api4.thetvdb.com/v4
TheTVDB API key (required for TVDB)
- Target
- TVDB_APIKEY
TheTVDB PIN (optional)
- Target
- TVDB_PIN
Language code for TheTVDB
- Target
- TVDB_LANGUAGE
- Default
- eng
Episode order: default or official
- Target
- TVDB_ORDER
- Default
- default|official
HTTP timeout for TheTVDB API calls
- Target
- TVDB_TIMEOUT_SEC
- Default
- 8
Reuse existing bearer token (optional)
- Target
- TVDB_BEARER
Enable ISO/disc image cleanup (0 or 1)
- Target
- ENABLE_ISO_CHECK
- Default
- 1|0
Minimum size for video files to keep (MB)
- Target
- MIN_KEEPABLE_VIDEO_MB
- Default
- 50
Seconds between file list checks during metadata fetching
- Target
- METADATA_POLL_INTERVAL
- Default
- 1.5
Max wait for metadata resolution (0 = infinite)
- Target
- METADATA_MAX_WAIT_SEC
- Default
- 0
Max bytes to download during metadata wait (0 = no limit)
- Target
- METADATA_DOWNLOAD_BUDGET_BYTES
- Default
- 0
Extension strategy: block or allow
- Target
- GUARD_EXT_STRATEGY
- Default
- block|allow
Comma-separated list of allowed extensions (for allow mode)
- Target
- GUARD_ALLOWED_EXTS
Comma-separated list of blocked extensions (overrides defaults in block mode)
- Target
- GUARD_BLOCKED_EXTS
Delete only if all files are disallowed (0 or 1)
- Target
- GUARD_EXT_DELETE_IF_ALL_BLOCKED
- Default
- 1|0
Delete if any file is disallowed (0 or 1)
- Target
- GUARD_EXT_DELETE_IF_ANY_BLOCKED
- Default
- 0|1
Tag applied to torrents deleted for extension violations
- Target
- GUARD_EXT_VIOLATION_TAG
- Default
- trash:ext
Disc image extensions
- Target
- GUARD_DISC_EXTS
- Default
- iso,img,mdf,nrg,cue,bin
Path to JSON config file (optional)
- Target
- GUARD_EXTS_FILE
Logging verbosity: INFO or DEBUG
- Target
- LOG_LEVEL
- Default
- INFO|DEBUG
HTTP User-Agent string for API calls
- Target
- USER_AGENT
- Default
- qbit-guard/2.0