Files
mov-renamarr/README.md
2025-12-30 10:52:59 -05:00

3.2 KiB

mov-renamarr 🎬

Fast, safe CLI to rename movie files into Radarr-compatible folders and filenames on Linux. It uses ffprobe for media details, filename parsing for hints, and optional online metadata (TMDb/OMDb) with caching. Default action is copy; move/rename-in-place are opt-in.

Features

  • Radarr-style output: Title (Year)/Title (Year) [quality] [id].ext
  • Safe defaults: copy by default, skip on collision (opt-in overwrite/suffix)
  • Metadata providers: TMDb, OMDb, or both (auto picks TMDb if available)
  • Optional local LLM (Ollama) for filename parsing and lookup assist
  • SQLite cache to reduce repeated lookups
  • Reports in text/json/csv (stdout by default)
  • Concurrency controls with sensible defaults

Requirements 📋

  • Linux
  • ffprobe in PATH (install via ffmpeg)

Install 📦

From source:

cargo build --release

Binary will be at target/release/mov-renamarr.

Install with Cargo:

# From a git repo
cargo install --git <repo-url> --locked

# From a local checkout
cargo install --path . --locked

Quick start 🚀

Create a default config (with comments) and see the config path:

mov-renamarr

Dry-run with TMDb:

mov-renamarr --input /path/to/in --output /path/to/out --dry-run --provider tmdb

Rename in place (no network lookups):

mov-renamarr --input /path/to/in --rename-in-place --no-lookup

Configuration ⚙️

Default config location: $XDG_CONFIG_HOME/mov-renamarr/config.toml (fallback ~/.config/mov-renamarr/config.toml)

Cache location: $XDG_CACHE_HOME/mov-renamarr/cache.db (fallback ~/.cache/mov-renamarr/cache.db)

The app creates a commented default config on first run and prints the path.

Key options (TOML):

  • provider = "auto"|"tmdb"|"omdb"|"both"
  • tmdb.api_key or tmdb.bearer_token (TMDb read access token supported)
  • omdb.api_key
  • quality_tags = ["resolution"] (or add codec, source)
  • llm.mode = "off"|"parse"|"assist"
  • llm.endpoint = "http://localhost:11434"
  • llm.model = "Qwen2.5:latest" (recommended for accuracy: Qwen2.5:14b)
  • jobs = "auto"|N, net_jobs = "auto"|N
  • sidecars = false (copy/move sidecars when true)

CLI flags override config, and env vars override config as well.

Providers 🌐

  • TMDb: preferred when available. Supports API key or read-access bearer token.
  • OMDb: optional, API key required.
  • Auto: uses TMDb if configured, else OMDb.
  • No-lookup: --no-lookup (or --offline) uses filename/LLM only.

LLM (optional) 🤖

If enabled, Ollama is used for:

  • filename parsing (llm.mode = "parse")
  • lookup assistance (llm.mode = "assist")

LLM output is treated as hints; provider results (when enabled) remain the source of truth.

Reports 📝

By default, output is printed to stdout. To write a report file:

mov-renamarr --input ... --output ... --report

This creates mov-renamarr-report-YYYYMMDD-HHMMSS.txt in the current directory.

Formats: --report-format text|json|csv

Safety and collisions 🛡️

Default is skip if the destination exists. Options:

  • --overwrite to overwrite
  • --suffix to append (1), (2), ...

Testing 🧪

cargo test

License 📜

MIT (see LICENSE).