qbit-guard

qbit-guard

Docker-Anwendung from GEngines' Repository

Übersicht

A zero-dependency Python guard for qBittorrent that blocks pre-air TV episodes (Sonarr), 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. Key Features: Pre-air gate (Sonarr): Stops new TV torrents, checks airDateUtc with configurable grace periods TMDB integration (Radarr): Verifies movie digital release dates to prevent pre-release downloads Extension policy: Allow/Block by file extension with configurable strategies Selective file unchecking: Optionally uncheck blocked files instead of deleting entire torrents 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, TheTVDB, and/or TMDB API integration Zero dependencies: No external libraries, just Python 3.8+ stdlib Container-friendly: All configuration via environment variables, logs to stdout

Laufzeit-Argumente

Netzwerk
bridge
Shell
sh
Privilegiert
false
Extra Params
--restart unless-stopped

Konfiguration der Vorlage

Variable: QBIT_HOSTVariable

qBittorrent WebUI URL

Ziel
QBIT_HOST
Standard
http://127.0.0.1:8080
Variable: QBIT_USERVariable

qBittorrent WebUI username

Ziel
QBIT_USER
Standard
admin
Variable: QBIT_PASSVariable

qBittorrent WebUI password

Ziel
QBIT_PASS
Standard
adminadmin
Variable: QBIT_ALLOWED_CATEGORIESVariable

Comma-separated list of categories to process

Ziel
QBIT_ALLOWED_CATEGORIES
Standard
radarr,tv-sonarr
Variable: QBIT_DELETE_FILESVariable

Delete files when removing torrents

Ziel
QBIT_DELETE_FILES
Standard
true|false
Variable: QBIT_IGNORE_TLSVariable

Set to 1 to ignore SSL certificate errors

Ziel
QBIT_IGNORE_TLS
Standard
0|1
Variable: QBIT_DRY_RUNVariable

Set to 1 for testing mode (no actual deletions)

Ziel
QBIT_DRY_RUN
Standard
0|1
Variable: WATCH_POLL_SECONDSVariable

How often to check qBittorrent for new torrents (seconds)

Ziel
WATCH_POLL_SECONDS
Standard
3.0
Variable: WATCH_PROCESS_EXISTING_AT_STARTVariable

Process existing torrents when container starts (0 or 1)

Ziel
WATCH_PROCESS_EXISTING_AT_START
Standard
0|1
Variable: WATCH_RESCAN_KEYWORDVariable

Keyword in category/tags to force reprocessing

Ziel
WATCH_RESCAN_KEYWORD
Standard
rescan
Variable: ENABLE_PREAIR_CHECKVariable

Enable pre-air checking for TV shows and movies (0 or 1)

Ziel
ENABLE_PREAIR_CHECK
Standard
1|0
Variable: SONARR_URLVariable

Sonarr base URL

Ziel
SONARR_URL
Standard
http://127.0.0.1:8989
Variable: SONARR_APIKEYVariable

Sonarr API key

Ziel
SONARR_APIKEY
Variable: SONARR_CATEGORIESVariable

Categories to apply pre-air checks to

Ziel
SONARR_CATEGORIES
Standard
tv-sonarr
Variable: EARLY_GRACE_HOURSVariable

Allow releases this many hours before air date

Ziel
EARLY_GRACE_HOURS
Standard
6
Variable: EARLY_HARD_LIMIT_HOURSVariable

Block releases more than this many hours early

Ziel
EARLY_HARD_LIMIT_HOURS
Standard
72
Variable: WHITELIST_OVERRIDES_HARD_LIMITVariable

Let whitelisted releases bypass hard limit (0 or 1)

Ziel
WHITELIST_OVERRIDES_HARD_LIMIT
Standard
0|1
Variable: EARLY_WHITELIST_GROUPSVariable

Comma-separated list of trusted release groups

Ziel
EARLY_WHITELIST_GROUPS
Variable: EARLY_WHITELIST_INDEXERSVariable

Comma-separated list of trusted indexers

Ziel
EARLY_WHITELIST_INDEXERS
Variable: EARLY_WHITELIST_TRACKERSVariable

Comma-separated list of trusted trackers

Ziel
EARLY_WHITELIST_TRACKERS
Variable: RESUME_IF_NO_HISTORYVariable

Proceed if Sonarr history not found (0 or 1)

Ziel
RESUME_IF_NO_HISTORY
Standard
1|0
Variable: SONARR_TIMEOUT_SECVariable

HTTP timeout for Sonarr API calls

Ziel
SONARR_TIMEOUT_SEC
Standard
45
Variable: SONARR_RETRIESVariable

Retry attempts for Sonarr operations

Ziel
SONARR_RETRIES
Standard
3
Variable: RADARR_URLVariable

Radarr base URL

Ziel
RADARR_URL
Standard
http://127.0.0.1:7878
Variable: RADARR_APIKEYVariable

Radarr API key

Ziel
RADARR_APIKEY
Variable: RADARR_CATEGORIESVariable

Categories for Radarr blocklisting and pre-air checks

Ziel
RADARR_CATEGORIES
Standard
radarr
Variable: RADARR_TIMEOUT_SECVariable

HTTP timeout for Radarr API calls

Ziel
RADARR_TIMEOUT_SEC
Standard
45
Variable: RADARR_RETRIESVariable

Retry attempts for Radarr operations

Ziel
RADARR_RETRIES
Standard
3
Variable: INTERNET_CHECK_PROVIDERVariable

Provider selection: off, tvmaze, tvdb, or both

Ziel
INTERNET_CHECK_PROVIDER
Standard
tvmaze|tvdb|both|off
Variable: TVMAZE_BASEVariable

TVmaze API base URL

Ziel
TVMAZE_BASE
Standard
https://api.tvmaze.com
Variable: TVMAZE_TIMEOUT_SECVariable

HTTP timeout for TVmaze API calls

Ziel
TVMAZE_TIMEOUT_SEC
Standard
8
Variable: TVDB_BASEVariable

TheTVDB API base URL

Ziel
TVDB_BASE
Standard
https://api4.thetvdb.com/v4
Variable: TVDB_APIKEYVariable

TheTVDB API key (required for TVDB)

Ziel
TVDB_APIKEY
Variable: TVDB_PINVariable

TheTVDB PIN (optional)

Ziel
TVDB_PIN
Variable: TVDB_LANGUAGEVariable

Language code for TheTVDB

Ziel
TVDB_LANGUAGE
Standard
eng
Variable: TVDB_ORDERVariable

Episode order: default or official

Ziel
TVDB_ORDER
Standard
default|official
Variable: TVDB_TIMEOUT_SECVariable

HTTP timeout for TheTVDB API calls

Ziel
TVDB_TIMEOUT_SEC
Standard
8
Variable: TVDB_BEARERVariable

Reuse existing bearer token (optional)

Ziel
TVDB_BEARER
Variable: TMDB_APIKEYVariable

TMDB API key (required for movie digital release verification)

Ziel
TMDB_APIKEY
Variable: TMDB_BASEVariable

TMDB API base URL

Ziel
TMDB_BASE
Standard
https://api.themoviedb.org/3
Variable: TMDB_TIMEOUT_SECVariable

HTTP timeout for TMDB API calls

Ziel
TMDB_TIMEOUT_SEC
Standard
8
Variable: TMDB_LANGUAGEVariable

Language code for TMDB

Ziel
TMDB_LANGUAGE
Standard
en-US
Variable: ENABLE_ISO_CHECKVariable

Enable ISO/disc image cleanup (0 or 1)

Ziel
ENABLE_ISO_CHECK
Standard
1|0
Variable: MIN_KEEPABLE_VIDEO_MBVariable

Minimum size for video files to keep (MB)

Ziel
MIN_KEEPABLE_VIDEO_MB
Standard
50
Variable: METADATA_POLL_INTERVALVariable

Seconds between file list checks during metadata fetching

Ziel
METADATA_POLL_INTERVAL
Standard
1.5
Variable: METADATA_MAX_WAIT_SECVariable

Max wait for metadata resolution (0 = infinite)

Ziel
METADATA_MAX_WAIT_SEC
Standard
0
Variable: METADATA_DOWNLOAD_BUDGET_BYTESVariable

Max bytes to download during metadata wait (0 = no limit)

Ziel
METADATA_DOWNLOAD_BUDGET_BYTES
Standard
0
Variable: GUARD_EXT_STRATEGYVariable

Extension strategy: block or allow

Ziel
GUARD_EXT_STRATEGY
Standard
block
Variable: GUARD_ALLOWED_EXTSVariable

Comma-separated list of allowed extensions (for allow mode)

Ziel
GUARD_ALLOWED_EXTS
Variable: GUARD_BLOCKED_EXTSVariable

Comma-separated list of blocked extensions (overrides defaults in block mode)

Ziel
GUARD_BLOCKED_EXTS
Variable: GUARD_EXT_DELETE_IF_ALL_BLOCKEDVariable

Delete only if all files are disallowed (0 or 1)

Ziel
GUARD_EXT_DELETE_IF_ALL_BLOCKED
Standard
1|0
Variable: GUARD_EXT_DELETE_IF_ANY_BLOCKEDVariable

Delete if any file is disallowed (0 or 1)

Ziel
GUARD_EXT_DELETE_IF_ANY_BLOCKED
Standard
0|1
Variable: GUARD_UNCHECK_BLOCKED_FILESVariable

Uncheck blocked files instead of deleting torrent (0 or 1)

Ziel
GUARD_UNCHECK_BLOCKED_FILES
Standard
0|1
Variable: GUARD_EXT_VIOLATION_TAGVariable

Tag applied to torrents deleted for extension violations

Ziel
GUARD_EXT_VIOLATION_TAG
Standard
trash:ext
Variable: GUARD_DISC_EXTSVariable

Disc image extensions

Ziel
GUARD_DISC_EXTS
Standard
iso,img,mdf,nrg,cue,bin
Variable: GUARD_EXTS_FILEVariable

Path to JSON config file (optional)

Ziel
GUARD_EXTS_FILE
Variable: LOG_LEVELVariable

Logging verbosity: INFO, DEBUG, or DETAILED

Ziel
LOG_LEVEL
Standard
INFO|DEBUG|DETAILED
Variable: USER_AGENTVariable

HTTP User-Agent string for API calls

Ziel
USER_AGENT
Standard
qbit-guard/2.0

Einzelheiten

Repository
ghcr.io/gengines/qbit-guard
Zuletzt aktualisiert2026-05-31
Erstmals gesehen2025-08-28

Führen Sie qbit-guard auf Unraid aus.

qbit-guard ist gelistet in Community Apps für Unraid OS. Erkunden Sie Unraid, um einen flexiblen Heimserver, ein NAS oder ein Heimlabor aufzubauen.