No description
- Go 98.5%
- Makefile 1.2%
- Dockerfile 0.3%
| .github | ||
| cmd | ||
| deploy | ||
| internal | ||
| proto/automationv1 | ||
| test | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| .golangci.yml | ||
| CHANGELOG.md | ||
| COMPATIBILITY.md | ||
| CONTRIBUTING.md | ||
| Dockerfile | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| Makefile | ||
| muxcore.json | ||
| README.md | ||
| ROADMAP.md | ||
| SECURITY.md | ||
Media Automation
Automation engine for MuxCore — searches indexers, scores releases, and dispatches downloads for wanted media.
A MuxCore sidecar module that bridges the gap between library management and downloading. It monitors wanted items, searches indexer modules, scores results by quality, and sends the best match to a downloader.
How It Works
Admin UI ──→ media-automation ──→ indexer modules (parallel Search)
│ ├── site module A
│ ├── site module B
│ └── aggregator (optional)
├──→ downloader (dispatch)
│
└──→ SQLite (queue + history)
Key Features
- Quality scoring — prefers
media-custom-formatsScoreReleasewhen available; falls back to local ranking by resolution (2160p > 1080p > 720p), format (Remux > BluRay > WEB-DL > HDTV), seeders, and size sanity - Upgrade / cutoff / delay — after import, keeps wanted items below profile cutoff when upgrades are allowed; re-searches and grabs only strictly better scores after
upgrade_delay_minutes - Protocol delay profiles — waits before grab using seeded
delay_profiles(default: torrent 15m, usenet 0) - Per-series overrides — optional
delay_minutesplus preferred/ignored release groups (series_overrides_jsonsetting orAUTOMATION_SERIES_OVERRIDES_JSON) - Multi-indexer search — discovers all modules advertising capability
indexer, searches them in parallel, merges results, dedupes by GUID (or download URL), then scores and limits - Download dispatch — sends selected releases to a downloader module
- Wanted items queue — persistence via SQLite with monitoring and missing state
- Periodic RSS sync — automatically searches for wanted items on an interval (default 15 minutes; mesh setting
rss_sync_minutes) - Mesh settings — capability
settings:enable_automatic_search,enable_automatic_upgrades,rss_sync_minutes - Download history — tracks all dispatched downloads with status
- Import on complete — on
download.completed, asks media-scanner toImportPaththe torrent save path and marks history complete (orimport_failed);download.failedmarks history failed. Onmedia.*.file_added, marks the wanted item owned (or removes it at cutoff / when upgrades disabled).
Configuration
Ops note: scanner watch directory
For import-on-complete to work, register the downloader’s DOWNLOAD_DIR (or whatever path torrents finish in) as a media-scanner watch directory. ImportPath only accepts paths under a registered watch dir; otherwise the history row is marked import_failed.
CLI Flags
| Flag | Default | Description |
|---|---|---|
--muxcore-mesh-addr |
- | Core gRPC address |
--muxcore-module-id |
media-automation |
Module identity |
Environment Variables
| Variable | Default | Description |
|---|---|---|
AUTOMATION_DB_PATH |
/var/lib/media-automation/automation.db |
SQLite database path |
AUTOMATION_GRPC_ADDR |
:9460 |
gRPC listen address |
MUXCORE_GRPC_ADDR |
localhost:9090 |
Core mesh gRPC address |
MUXCORE_MODULE_ID |
media-automation |
Module identity (overrides --muxcore-module-id) |
MUXCORE_INSECURE_DISABLE_TLS |
false |
Disable TLS for dev |
AUTOMATION_SERIES_OVERRIDES_JSON |
[] |
Seed/replace per-series overrides on init (JSON array) |
Quick Start
# Build
make build
# Run against local core (dev mode)
export MUXCORE_INSECURE_DISABLE_TLS=true
./media-automation --muxcore-mesh-addr localhost:9090
gRPC API
SearchItem
Score-based search across all discovered indexer modules (parallel fan-out, merge, dedupe).
{
"item_type": "movie",
"query": "Fight Club",
"year": 1999,
"limit": 50
}
Dispatch
Send a selected release to the downloader.
{
"guid": "abc123",
"title": "Fight Club 1999 1080p BluRay",
"download_url": "magnet:?...",
"download_protocol": "http"
}
AddToQueue / GetQueue / GetHistory
Queue management and history.
Development
make test # run tests with race detection
make lint # golangci-lint
make fmt # format code
make proto # regenerate protobuf code
License
GPL-3.0