Rewrite Curator in Rust with an egui GUI
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
# Curator
|
||||
|
||||
Curator is a PySide6 desktop app for managing a **Jellyfin-first movie and series
|
||||
library**. You import video files into a managed **pool**; Curator identifies them
|
||||
through **TMDb**, names and lays them out the way Jellyfin expects, and can
|
||||
generate a genre-split **miniDLNA / Filmotéka** tree of hardlinks for dumb DLNA
|
||||
players — without ever duplicating the video data on disk.
|
||||
Curator is a desktop app for managing a **Jellyfin-first movie and series
|
||||
library**. You import video files into a managed **pool**; Curator identifies
|
||||
them through **TMDb**, names and lays them out the way Jellyfin expects, and can
|
||||
generate a genre-split **miniDLNA** tree of hardlinks for simple DLNA players —
|
||||
without ever duplicating the video data on disk.
|
||||
|
||||
Metadata (posters, plots, `.nfo` files) is Jellyfin's job; Curator owns the files,
|
||||
their names and the library structure.
|
||||
Metadata (posters, plots, `.nfo` files) is Jellyfin's job; Curator owns the
|
||||
files, their names and the library structure. Written in Rust with an egui GUI.
|
||||
|
||||
## Concepts
|
||||
|
||||
@@ -17,72 +17,75 @@ their names and the library structure.
|
||||
|
||||
| Kind | Holds | Layout |
|
||||
|------|-------|--------|
|
||||
| `movie` | movies | `Title (rok) [tmdbid].ext`, or a folder once a film has several versions |
|
||||
| `series` | series | `Series (rok) [tmdbid]/Season NN/SxxEyy - Series.ext` |
|
||||
| `movie` | movies | `Title (rok) [tmdbid-N].ext`, or a folder once a film has several versions |
|
||||
| `series` | series | `Series (rok) [tmdbid-N]/Season NN/SxxEyy - Series.ext` |
|
||||
| `mixed` | movies and series together | as above, side by side |
|
||||
| `homevideo` | files without a TMDb id | mirrored as-is |
|
||||
|
||||
- **Pool index** — Curator's own metadata (TMDb id, ČSFD link, versions, tags,
|
||||
library settings) lives in one `.Curator.!index` JSON file at the pool root.
|
||||
- **miniDLNA output** — a generated tree of **hardlinks** into the pool, built
|
||||
from the genres/years/ratings in Jellyfin's NFO files. It is disposable: delete
|
||||
it and regenerate it at any time.
|
||||
from genres / years / countries / ratings. It is disposable: delete it and
|
||||
regenerate it at any time.
|
||||
|
||||
## Features
|
||||
|
||||
- Import movies and episodes with a mandatory **TMDb id**; Czech titles come from
|
||||
TMDb, with **ČSFD** as a fallback and as a bridge for finding the right TMDb id.
|
||||
- **Multiple versions** of one film (2D/3D, 4K, director's cut) and **multi-part**
|
||||
films and episodes, named so Jellyfin groups them.
|
||||
- Import movies and episodes with a **TMDb id**; Czech titles come from TMDb,
|
||||
with **ČSFD** as a fallback and as a bridge for finding the right TMDb id.
|
||||
- **Multiple versions** of one film (2D/3D, 4K, director's cut) and
|
||||
**multi-part** films and episodes, named so Jellyfin groups them.
|
||||
- Subtitle sidecars follow their video through renames.
|
||||
- Duplicate check, video integrity check (FFmpeg), library statistics.
|
||||
- Jellyfin integration: trigger a library scan, read what Jellyfin has.
|
||||
- Duplicate check, video integrity check (FFmpeg), library statistics,
|
||||
index/disk consistency check.
|
||||
- Jellyfin integration: trigger a library scan, verify the pool against it.
|
||||
- miniDLNA tree scoped per library, with "Tipy dne" and "Nově přidané" folders.
|
||||
|
||||
## Requirements
|
||||
|
||||
- [uv](https://docs.astral.sh/uv/) — manages Python 3.14 and all dependencies
|
||||
- Rust 1.85+ (`rustup`), for building
|
||||
- `ffmpeg` / `ffprobe` on `PATH` — optional, for the integrity check
|
||||
|
||||
## Configuration
|
||||
|
||||
Secrets and settings are read from a `.env` file in the project root (never
|
||||
committed):
|
||||
Secrets and settings are read from a `.env` file in the working directory
|
||||
(never committed):
|
||||
|
||||
| Variable | Purpose |
|
||||
|----------|---------|
|
||||
| `TMDB_API_KEY` | TMDb API key — required for identifying movies and series |
|
||||
| `TMDB_API_KEY` | TMDb API key — needed to identify movies and series |
|
||||
| `TMDB_LANGUAGE` | TMDb language, default `cs-CZ` |
|
||||
| `JELLYFIN_URL` | Jellyfin server URL — optional, for the Jellyfin menu |
|
||||
| `JELLYFIN_API_KEY` | Jellyfin API key — optional |
|
||||
| `ENV_DEBUG` | `true` enables debug mode |
|
||||
| `ENV_DEBUG` | `true` enables debug logging and the `-DEV` title |
|
||||
|
||||
The pool and output folders are chosen in the app (*Pool* menu).
|
||||
The pool and output folders are chosen in the app (*Pool* menu) and stored in
|
||||
the global config (`~/.config/curator/.Curator.!gtag` on Linux, overridable with
|
||||
`CURATOR_CONFIG`).
|
||||
|
||||
## Running
|
||||
|
||||
```bash
|
||||
uv sync
|
||||
uv run python Curator.py
|
||||
cargo run --release
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
```bash
|
||||
uv run pytest # tests
|
||||
uv run ruff check # lint
|
||||
uv run ruff format # format
|
||||
uv run mypy # type checking
|
||||
cargo fmt # format
|
||||
cargo clippy -- -D warnings # lint
|
||||
cargo test # unit tests + headless UI tests
|
||||
cargo doc --open # API reference
|
||||
```
|
||||
|
||||
Detailed documentation — architecture and a per-module reference — is in
|
||||
[`docs/`](docs/README.md).
|
||||
`cargo run --example screenshot -- out.png [--action edit]` renders the window
|
||||
offscreen to a PNG. Architecture and module overview: [`docs/`](docs/README.md).
|
||||
|
||||
## Building a standalone executable
|
||||
## Building
|
||||
|
||||
```bash
|
||||
uv run python prebuild.py
|
||||
uv run pyinstaller Curator.spec --noconfirm
|
||||
cargo build --release
|
||||
```
|
||||
|
||||
The result is a single self-contained `dist/Curator` executable.
|
||||
The result is `target/release/curator`, plus `target/release/tipy-dne` — a
|
||||
standalone "Tipy dne" refresher meant for a systemd timer (see
|
||||
`scripts/tipy-dne.service` / `.timer`).
|
||||
|
||||
Reference in New Issue
Block a user