Watch your precious cargo. Stow it smarter.
Automatically optimize watched media to reclaim storage without sacrificing quality.
Status: v0.1.0-alpha / read-only
Stowarr currently observes media state, evaluates lifecycle eligibility, and scores replacement candidates. Downloads, imports, replacements, and deletions are not yet enabled.
Stowarr is a lifecycle-aware storage optimizer for self-hosted media libraries using Jellyfin, Sonarr, and Radarr.
The intended workflow is:
- Detect when media has been watched.
- Wait a configurable grace period.
- Inspect the existing file and storage cost.
- Evaluate smaller acceptable replacements.
- Estimate potential storage savings.
- Request approval.
- Acquire the replacement through Sonarr or Radarr.
- Verify the successful import.
- Only then allow the original media to be retired.
- Report actual storage saved.
Only the read-only observation and policy layers are implemented today.
Existing media must never be removed before its replacement has been successfully downloaded, imported, and verified.
Current safety rules include:
- Jellyfin
Played=truedetermines watched state. - Missing or uncertain completion history fails safe.
- Default watched delay is 30 days.
- Minimum replacement resolution is 1080p.
- Remux, raw-HD, BR-DISK, CAM, and telesync candidates are rejected.
- HEVC / x265 / H.265 is preferred.
- Candidates must save at least 5 GiB OR 40%.
- Source-service synchronization is read-only.
- Download, import, and delete capabilities remain disabled.
- Initial write-enabled workflows will require explicit approval.
- Jellyfin watched-state inventory
- Sonarr season correlation
- Radarr movie inventory
- TV season completeness detection
- Persistent SQLite state
- Stable identity keys
- Schema versioning
- Audit-log foundation
- Lifecycle safety engine
- 30-day eligibility policy
- Replacement candidate scoring
- Storage-savings calculations
- Unprivileged Docker runtime
- Secret-safe configuration
- SQLite-safe backups
- Automated validation and unit tests
- Release searching
- Downloads
- Replacement imports
- Media deletion
- Telegram approval
- Automatic optimization
Run:
./scripts/validate.sh
All tests and safety checks must pass before changes are committed.
Never commit API keys, passwords, tokens, or other credentials.
Runtime credentials are supplied through environment variables and local configuration files excluded from Git.
See SECURITY.md for vulnerability reporting guidance.
MIT