-
Notifications
You must be signed in to change notification settings - Fork 0
Integrations Guide
Overview: Automate RightSub across your home lab and media server stack. Run subtitle mastering, BiDi correction, and translation in a 100% hands-off "Set-and-Forget" workflow.
This guide provides tested, copy-pasteable configurations for the most popular home media tools across Windows and macOS/Linux: 0. The Recommended 2-Phase Strategy & Daemon Architecture
- qBittorrent (Run on Completion & Seed-Safe)
- Sonarr & Radarr (Webhook Integration or Post-Import Script)
- Bazarr (Webhook Daemon or Post-Processing Hook)
- Transmission (Torrent Completion Script)
- Tautulli / Plex (Recently Added Webhook)
- Standalone OS Folder Watchers (Non-Arr / Manual Setups)
- Troubleshooting & Verifying Integrations
Before configuring individual hooks, understand RightSub's architectural philosophy:
-
Phase 1: One-Off Retroactive Library Fix
Run RightSub once across your existing media library to normalize legacy files:RightSub recursively scans the entire directory, converts legacy CP1255 / ISO-8859-8 charsets to clean UTF-8, injects RLM marks for flawless Plex BiDi punctuation, cleans ads and SDH hearing-impaired noise, and outputs standard# Windows: rightsub auto "C:\Media\TV Shows" # macOS / Linux: rightsub auto /Volumes/Media/TV_Shows
.he.srtfiles without modifying original torrent downloads. -
Phase 2: Event-Driven Automation (Set-and-Forget)
From this point on, do not run a heavy, polling background directory scanner. Instead, connect your downloaders (qBittorrent, Sonarr, Radarr, Bazarr) to trigger RightSub the exact second a new file finishes downloading.
Users often ask: "Why doesn't RightSub run as a persistent background daemon that watches directories?"
In home media environments, constant filesystem polling is an architectural anti-pattern:
- Race Conditions & Partial File Corruption: When torrent clients download large 15GB files or extract multi-part archives, disk writes take minutes or hours. A naive watcher daemon detects file creation instantly and attempts to read or lock partial, incompletely written files — resulting in crashes and corrupt subtitle output.
- Zero Idle Resource Consumption: Background daemons keep Python runtime active continuously (40–80 MB RAM) and wake CPU cores periodically. Event-driven hooks consume 0% CPU and 0 MB RAM when idle — RightSub spawns for a fraction of a second, masters the subtitle, and exits cleanly.
- Atomic, Verified Execution: Downloaders know with mathematical certainty when a file has passed hash verification, finished writing, and closed its file handles. Triggering at that moment guarantees zero errors.
qBittorrent can invoke RightSub the exact millisecond a download finishes.
Modifying an active torrent's subtitle file (changing its name to Movie.he.srt or editing punctuation directly) changes the file's hash and triggers qBittorrent I/O recheck errors.
RightSub's Seed-Safe engine avoids this by duplicating the subtitle into a clean .he.srt file while leaving the original file 100% bit-for-bit intact. Active torrent seeding is never interrupted.
- Open qBittorrent.
- Go to: Tools -> Options (or
Preferenceson macOS). - Select the Downloads tab in the sidebar.
- Scroll to the bottom and check:
☑ "Run external program on torrent completion". - Enter the command for your operating system:
rightsub auto "%F"(If rightsub is not in your system PATH, use: python "C:\path\to\RightSub\rightsub.py" auto "%F")
/usr/local/bin/rightsub auto "%F"(Or ~/.local/bin/rightsub auto "%F")
Note on
%F: qBittorrent replaces%Fwith the absolute path of the downloaded file or directory.
Sonarr and Radarr allow external automation to execute immediately after an episode or movie has been imported and organized into your library (On Download, On Upgrade, and On Movie Imported).
RightSub supports two integration methods:
- Method A (Recommended for Docker, Unraid, TrueNAS, Synology): Native Webhook Server with zero host script or Python dependencies.
- Method B (For Bare-Metal Systems): Custom Script invocation.
When Sonarr and Radarr run inside isolated Docker containers, invoking host scripts is impossible. RightSub's built-in Webhook daemon provides native, seamless HTTP event handling:
# Direct CLI run or container launch:
rightsub serve --port 8775 --path-map "/data/media:/media"
# Or deploy via docker-compose.yml:
docker compose up -d(For path mapping details across volumes, see Cross-Container Path Translation (PATH_MAP))
- Open the Sonarr or Radarr Web UI.
- Navigate to: Settings -> Connect.
- Click the
+icon and select Webhook. - Fill in the parameters:
-
Name:
RightSub Subtitle Master - Notification Triggers: Check ☑ On Download, ☑ On Upgrade, and in Radarr also ☑ On Movie Imported.
-
URL:
- Within same Docker bridge network:
http://rightsub:8775/webhook/sonarr(or/webhook/radarr). - Across network / host IP:
http://SERVER-IP:8775/webhook/sonarr.
- Within same Docker bridge network:
-
Method:
POST
-
Name:
- Click Test — RightSub will respond with
200 OKand log the test ping. - Click Save.
For users running Sonarr/Radarr directly on the host operating system:
@echo off
setlocal
:: Sonarr passes sonarr_episodefile_path; Radarr passes radarr_moviefile_path
set "TARGET_PATH="
if defined sonarr_episodefile_path set "TARGET_PATH=%sonarr_episodefile_path%"
if defined radarr_moviefile_path set "TARGET_PATH=%radarr_moviefile_path%"
if defined TARGET_PATH (
rightsub auto "%TARGET_PATH%"
)#!/usr/bin/env bash
TARGET_PATH="${sonarr_episodefile_path:-$radarr_moviefile_path}"
if [ -n "$TARGET_PATH" ] && [ -f "$TARGET_PATH" ]; then
/usr/local/bin/rightsub auto "$TARGET_PATH"
fi(Make sure to grant execution permissions: chmod +x /usr/local/bin/rightsub_arr_hook.sh)
- Navigate to Settings -> Connect.
- Click the
+icon and select Custom Script. - Fill in the fields:
-
Name:
RightSub Auto-Master - Notification Triggers: Check ☑ On Download and ☑ On Upgrade.
-
Path: Set to your script path (
C:\Scripts\rightsub_arr_hook.bator/usr/local/bin/rightsub_arr_hook.sh).
-
Name:
- Click Test and then Save.
Bazarr crawls 30+ internet subtitle providers. However, community-uploaded Hebrew subtitles routinely suffer from serious flaws:
- ❌ Reversed punctuation (
?,!,..., hyphens) in Plex, Apple TV, and Infuse. - ❌ Legacy Windows-1255 / ISO-8859-8 charsets rendering as unreadable gibberish / mojibake.
- ❌ Annoying promotional ads and translation credit lines ("סונכרן ע"י Torec", "SubCenter", Telegram links).
RightSub completely eliminates these anomalies the exact moment Bazarr saves the subtitle file to disk:
- Method A (Recommended): Direct Webhook from Bazarr to RightSub Server (Turnkey for Docker & NAS).
- Method B: Custom Post-Processing (For bare-metal non-containerized setups).
This is the cleanest, fastest, and most robust approach. It requires zero custom scripts inside your Bazarr container:
# Run server on port 8775:
rightsub serve --port 8775 --path-map "/data/media:/media"- Open your Bazarr Web UI (
http://localhost:6767or your NAS IP). - Navigate to: Settings -> Notifications.
- Click the
+button (Add Notification) and select Webhook. - Configure the settings:
-
Name:
RightSub BiDi & Hebrew Master -
URL:
- Inside Docker network:
http://rightsub:8775/webhook/bazarr - Or using server IP:
http://192.168.1.X:8775/webhook/bazarr
- Inside Docker network:
-
HTTP Method:
POST -
Notification Types:
- Check ONLY: ☑ On Subtitles Download (or
On subtitles download).
- Check ONLY: ☑ On Subtitles Download (or
-
Name:
- Click Test:
- RightSub logs:
[Webhook] Received Bazarr test ping.and responds with200 OK.
- RightSub logs:
- Click Save.
- Bazarr issues a
POST /webhook/bazarrevent containing the subtitle path and language code (language: "he"). - RightSub Webhook Daemon:
-
Language Verification: Confirms language is Hebrew (
he/heb); silently ignores non-Hebrew downloads (English, French, etc.) with 0 overhead. -
Path Translation: Translates paths according to
PATH_MAPif volume mounts differ between containers. -
SubRefine Engine Execution:
- Injects invisible Unicode RLM marks for flawless BiDi punctuation in Plex & Infuse.
- Auto-converts legacy Windows-1255/CP1255 encoding to clean UTF-8.
- Strips translator spam, promotional ads, and SDH noise tags.
-
Metadata Touch: Flushes file timestamps via
os.utime()so Plex and Infuse detect modifications instantly.
-
Language Verification: Confirms language is Hebrew (
- The entire mastering cycle completes in under 0.1 seconds!
For users running Bazarr directly on the host machine without Docker:
- Open the Bazarr Web UI (
http://localhost:6767). - Go to Settings -> Subtitles -> Post-processing.
- Under Custom Post-Processing:
- Check ☑ Enable custom post-processing.
- In Command, enter:
rightsub auto "{{subtitles_path}}"rightsub auto "{{subtitles_path}}"- Click Save in the upper left corner.
In Docker environments (Docker Compose, Unraid, TrueNAS SCALE, Synology DSM), *arr containers and Bazarr often mount media shares under different directory prefixes than RightSub.
For example:
- Bazarr perceives subtitles at:
/data/media/tv/show.he.srt - RightSub mounts the media volume at:
/media/tv/show.he.srt
Specify PATH_MAP when launching RightSub:
# Syntax: FROM_PREFIX:TO_PREFIX
rightsub serve --path-map "/data/media:/media"
# Or in docker-compose.yml:
environment:
- PATH_MAP=/data/media:/mediaRightSub automatically rewrites path prefixes for every incoming Sonarr, Radarr, and Bazarr webhook event.
For users running Transmission daemon or client on macOS/Linux/NAS:
#!/usr/bin/env bash
# Transmission passes $TR_TORRENT_DIR and $TR_TORRENT_NAME
TARGET_DIR="${TR_TORRENT_DIR}/${TR_TORRENT_NAME}"
if [ -e "$TARGET_DIR" ]; then
/usr/local/bin/rightsub auto "$TARGET_DIR"
fi(Grant execution permissions: chmod +x /usr/local/bin/transmission_rightsub.sh)
"script-torrent-done-enabled": true,
"script-torrent-done-filename": "/usr/local/bin/transmission_rightsub.sh"For users running Tautulli to monitor Plex libraries and trigger instant subtitle checks whenever new items land:
- Go to: Settings -> Notification Agents.
- Click Add a Notification Agent -> Script.
- Configuration:
- Script Folder: Folder containing your script.
-
Script File: Script invoking
rightsub auto "{file}". - Triggers: Check ☑ Recently Added.
-
Arguments (under Recently Added):
"{file}"
If you do not use automated downloaders and prefer dropping video files into an intake folder manually:
fswatch -0 -e ".*" -i "\\.(mkv|mp4|srt)$" /path/to/incoming | while read -d "" event; do
echo "[*] New file detected: $event"
rightsub auto "$event"
done$watcher = New-Object System.IO.FileSystemWatcher
$watcher.Path = "C:\Media\Incoming"
$watcher.Filter = "*.*"
$watcher.IncludeSubdirectories = $true
$watcher.EnableRaisingEvents = $true
Register-ObjectEvent $watcher "Created" -Action {
$path = $Event.SourceEventArgs.FullPath
if ($path -match '\.(mkv|mp4|srt)$') {
Start-Sleep -Seconds 5 # Wait for write flush
& rightsub auto "$path"
}
}-
Plex / Infuse Validation:
- Check Hebrew punctuation: question marks (
?), exclamation points (!), and periods should sit at the correct natural Hebrew ends of lines.
- Check Hebrew punctuation: question marks (
-
Log Verification:
- Webhook server prints structured timestamped logs:
[Webhook] Sonarr [Download] Translated '/data/media/tv/ep.mkv' -> '/media/tv/ep.mkv'[Webhook] Bazarr [download] Processed 1 subs (1 lines adjusted, fixed) -> Show.S01E01.he.srt
- Webhook server prints structured timestamped logs:
-
Backup Protection:
- When modifying in-place, pass
--backupto preserve the original subtitle as.srt.bak.
- When modifying in-place, pass
RightSub Automation Suite • Subtitles Done Right, 100% Hands-Free.
RightSub Wiki — Subtitles Done Right. Powered by the SubRefine Algorithmic Engine & SubSwarm Multi-Agent AI.
- Home
- 📦 Global Installation Guide
- 🔰 Quickstart for Beginners
- BiDi & Plex Guide
- Pipeline Workflow
- On-Device STT & Sync (quicksubs)
- TMDb Metadata & Entity Resolution
- AI Assistants & Integration
- ⚖️ RightSub vs. Bazarr Comparison
- 🔄 Home Media & Download Integrations
- 🔮 Interactive CLI Specification
- 🔮 Setup & Health Wizard Specification
- 🔌 MCP Server Specification
- 💎 Semantic AI Polish & QC Specification
- 🐳 Docker Webhook Server Specification
- 🗺️ Product Roadmap
- 🚀 What's New & Release Notes
- Boston Legal Case Study
- CLI Reference
- דף הבית (Home HE)
- 📦 מדריך התקנה גלובלית והפצה
- 🔰 מדריך פשוט למתחילים
- מדריך BiDi ו-Plex
- תהליך עבודה מלא
- תמלול וסנכרון מקומי (quicksubs)
- אינטגרציית TMDb (עלילה ומגדר)
- חיבור לכלי בינה מלאכותית (AI)
- ⚖️ השוואה טכנית מול Bazarr
- 🔄 מדריך אינטגרציות ואוטומציה לשרתי מדיה
- 🔮 מפרט אשף פקודה אינטראקטיבי
- 🔮 מפרט אשף התקנה ואבחון
- 🔌 מפרט שרת MCP
- 💎 מפרט מנוע ליטוש סמנטי ו-QC
- 🐳 מפרט שרת Webhook וקונטיינר
- 🗺️ מפת דרכים ומעקב אבני-דרך
- 🚀 מה חדש ועדכוני גרסאות
- מקרה בוחן - בוסטון ליגל
- מדריך פקודות CLI