4.4 KiB
Media Automator
Automates the pipeline:
qBittorrent (Mint VM)
↓ [completed torrent detected]
Category: 2 - copying → files move to transient dir
↓ [copy video files, flattened]
namer watch/
├── renamed/ → Whisparr import dir → Whisparr manual import API
└── failed/ → Stash library dir → Stash scan + identify (StashDB)
↓ [rename plugin fires]
stash-temp/ → Whisparr import dir → import
Category: 3 - seeding → files move to spinning array
Setup
1. Prerequisites
- Docker + Docker Compose on your LXC
- The Mint VM's NFS shares mounted on the LXC (see below)
- qBittorrent Web UI enabled on the Mint VM
- Whisparr and Stash running and accessible from the LXC
2. NFS Mounts (LXC side)
The automator needs to see the Mint VM's SSD paths. On your LXC, add to /etc/fstab:
# Mint VM transient dir
<MINT_VM_IP>:/transfer /mnt/ssd1/transfer nfs defaults,_netdev 0 0
Then: mount -a
Verify the path /mnt/ssd1/transfer/2 - ready for copy/ is accessible from the LXC.
3. qBittorrent Categories
In qBittorrent on the Mint VM, configure these categories with their save paths:
| Category | Save Path |
|---|---|
1 - downloading |
/mnt/nvme/home/jkilloran/torrenting/downloads/ |
2 - copying |
/transfer/2 - ready for copy/ |
3 - seeding |
/qbt/taz-transfer/seeding/ |
Make sure "Automatically manage torrent location" is enabled per category.
4. Configure
Copy config.yml to your LXC and fill in all < > placeholders:
# On the LXC, in your docker-compose directory:
nano config.yml
Key values to fill in:
qbittorrent.host— Mint VM IP addressqbittorrent.username/password— qBit Web UI credentialswhisparr.host/api_keystash.host/api_keydiscord.webhook_url— from Server Settings → Integrations → Webhooks
5. Build and Run
docker compose up -d --build
docker compose logs -f # watch the logs
Web UI is at: http://<LXC_IP>:8888
Flow Details
Space Management
Before processing each torrent the automator checks:
- Free space on the namer SSD ≥
namer_ssd_min_free_gb+ torrent size - If not enough space: sends a Discord alert, pauses, and retries every
space_check_intervalseconds - Resumes automatically once space is available (no intervention needed)
Disk Space Alerts
You'll get Discord alerts for:
- Pipeline paused due to low space (and when it resumes)
- Each torrent starting to process
- Successful Whisparr import
- Files sent to Stash + identify result
- Any errors
namer failed files
When namer can't identify a file it goes to stash/. The automator:
- Moves the file to your Stash library path
- Triggers
metadataScan→ waits for completion - Triggers
metadataIdentifyusing StashDB → waits for completion - The
rename-file-on-updateplugin fires automatically → file appears instash-temp/ - Automator detects the file in
stash-temp/, waits 30s for it to stabilise, moves to Whisparr import dir - Triggers Whisparr manual import
Troubleshooting
qBit category change isn't moving files
- Verify "Automatic torrent management" is enabled for each category in qBit settings
- Check the save paths match exactly what's in the qBit category config
Whisparr import returns 0 matches
- The file naming matters — namer should produce
Studio.YYYY-MM-DD.Title.extformat - Check Whisparr's manual import UI for the file to see why it's not matching
Stash identify never fires the rename plugin
- Confirm
rename-file-on-updateis enabled in Stash Settings → Plugins - The plugin fires on scene update, not scan — identify must successfully update the scene
Permission errors
- Uncomment
user: "1000:1000"indocker-compose.ymland set to your LXC user's UID:GID - Check NFS mount options on the LXC
Adding the Docker qBittorrent Instance Later
When you're ready to add the LXC's qBit container to the same pipeline, the config
will gain a qbittorrent_docker: section with its own host/port/credentials, and the
automator will poll both instances in the same main loop. Paths will be LXC-native
(no NFS needed for that instance).