--- title: Media Pipeline Pitfalls created: '2026-05-23' updated: '2026-05-27' type: tech namespace: family tags: [media-pipeline, pitfalls, torrents, infra] related: - "[[tech/arr-stack-kraken]]" - "[[concepts/watchlist-automation]]" --- # Media Pipeline Pitfalls ## Torrents — Do Not Rename Files Never rename torrent source files or folders while a torrent is active. Transmission tracks files by path. Renaming breaks the association and causes re-download or stalled seeding. ## torrent-set-location Updates downloadDir `torrent-set-location` in the Transmission RPC updates `downloadDir` in the torrent metadata. Use this when moving completed files, not a manual rename. Sequence: 1. Move files to new location on disk 2. Call `torrent-set-location` with the new path + `move=false` 3. Verify torrent goes back to seeding state ## Router Creates Subdirectories — Transmission downloadDir Stale `router.py` creates subdirectory per title under the genre folder (lowercase name, e.g. `/media/cartoons/бобик в гостях у барбоса/`). Transmission still holds the old `downloadDir` pointing to the parent (`/media/cartoons/`). Result: torrents show "No data found" error. Fix: 1. Find the actual subdirectory on disk 2. Call `torrent-set-location` with the subdirectory path + `move=false` 3. Transmission verifies and resumes seeding ## Alpine Container — No Docker-in-Docker `on-download-complete.sh` runs inside the Transmission Alpine container. Docker CLI is not available there — using `docker run` inside the container fails silently or errors. Python 3.14 IS available in the Alpine image. Solution: `sync.py` (Python3, ~190 lines) in the same container: - Reads `config.json` for sorting rules + credentials (same file as linker container) - Queries TMDB for genre routing - Creates hardlinks + calls Transmission RPC `torrent-set-location` Location: `/srv/dev-disk-by-uuid-49e8f586-3839-4c5d-a1e1-58bfc3579ade/docker/media-pipeline/sync.py` ## General Rules - Never touch source files/folders (media-pipeline USER.md rule) - `resolve-manual` is emergency-only - NFO files: do not create manually; let the pipeline handle them - Never delete test files from the pipeline project