Add OMDb as a datasource: TV episodes (third option alongside TMDB/TVmaze) and movies (new second option alongside TMDB)
Movies get their own independent metadata-source setting for the first time (previously hardcoded to TMDB) so the GUI's Fetch Data Settings now has two separate pickers - TV episode source (TMDB/TVmaze/OMDb) and movie source (TMDB/OMDb) - and a batch can freely mix sources across its TV and movie halves. The -rename CLI's --db flag gained omdb alongside tmdb/tvmaze, with movies now looked up online for both tmdb and omdb.
This commit is contained in:
@@ -9,10 +9,11 @@ native file/folder loading and drag-and-drop, local filename-based season/episod
|
||||
movie title/year* detection ("Match") is working, real online metadata lookups
|
||||
("Fetch Data") are working for both TV episodes and movies — including fuzzy title
|
||||
disambiguation, so a search that returns several similarly-named results doesn't just
|
||||
take the source's top-ranked hit. TV episodes can resolve against either TMDB or
|
||||
TVmaze — user-selectable in Fetch Data Settings, TMDB stays the default and TVmaze
|
||||
needs no API token at all — while movies always resolve against TMDB, since TVmaze has
|
||||
no movie catalog. The actual on-disk operation is wired up (with a
|
||||
take the source's top-ranked hit. TV episodes can resolve against TMDB, TVmaze, or
|
||||
OMDb, and movies against TMDB or OMDb — each picked independently in Fetch Data
|
||||
Settings, TMDB stays the default for both, TVmaze needs no API token at all (it has no
|
||||
movie catalog, so it's TV-only), and TMDB/OMDb each need their own free saved
|
||||
credential before a batch resolved against them will succeed. The actual on-disk operation is wired up (with a
|
||||
confirmation step showing the full old-path/new-path plan before anything touches disk,
|
||||
a per-row ✕ to drop an individual file from that plan at the last step, a Move/Copy/
|
||||
Symlink selector for what to actually do at each target, and — independently — a Skip/
|
||||
@@ -135,10 +136,13 @@ crates/aurora-curator-core/ Pure Rust core: naming-expression engine (ported),
|
||||
the same module (`guess_release_info` — resolution, source, video/
|
||||
audio codec, release group), text-similarity scoring for
|
||||
disambiguating search results (`similarity/`, partial
|
||||
`EpisodeMetrics` port), two web metadata clients — `web/tmdb.rs`
|
||||
(TV search + episode lookup and movie search + lookup) and
|
||||
`EpisodeMetrics` port), three web metadata clients — `web/tmdb.rs`
|
||||
(TV search + episode lookup and movie search + lookup),
|
||||
`web/tvmaze.rs` (TV search + episode lookup only — TVmaze has no
|
||||
movie catalog, and no API key/auth at all), both disambiguated via
|
||||
movie catalog, and no API key/auth at all), and `web/omdb.rs` (TV
|
||||
*and* movie search + lookup, single flat root-URL REST API, plain
|
||||
`apikey` query-param auth rather than TMDB's Bearer token) — all
|
||||
three disambiguated via
|
||||
`similarity/` and tested against a mocked HTTP server via
|
||||
`mockito`, the on-disk
|
||||
rename engine (`rename/` — Move/Copy/Symlink actions,
|
||||
@@ -150,16 +154,19 @@ crates/aurora-curator-core/ Pure Rust core: naming-expression engine (ported),
|
||||
argument parsing/file expansion (`cli/` — no Tauri or network
|
||||
dependency at all, see "Command-line usage" below). Not yet
|
||||
ported: full media metadata bindings, other web datasource
|
||||
clients (TheTVDB/AniDB/OMDb/etc). No Tauri dependency, so it
|
||||
builds and unit-tests standalone.
|
||||
clients (TheTVDB/AniDB/OpenSubtitles/etc). No Tauri dependency, so
|
||||
it builds and unit-tests standalone.
|
||||
src-tauri/ Tauri app shell: exposes aurora-curator-core as commands to the frontend
|
||||
(naming-scheme rendering, filename matching for both TV and
|
||||
movies, metadata fetch — `metadata.rs` for TV episodes (against
|
||||
whichever of TMDB/TVmaze is the stored source) plus a
|
||||
movie-fetch command alongside it (always TMDB) — executing a rename
|
||||
whichever of TMDB/TVmaze/OMDb is the stored TV source) plus a
|
||||
movie-fetch command alongside it (against whichever of TMDB/OMDb
|
||||
is the stored movie source — independent of the TV source)
|
||||
— executing a rename
|
||||
plan, native file/folder dialogs, drag-and-drop expansion), plus
|
||||
`settings.rs` (TMDB token, and which TV metadata source Fetch Data
|
||||
uses), `history.rs` (rename history/undo
|
||||
`settings.rs` (TMDB token, OMDb API key, and which TV *and* movie
|
||||
metadata source Fetch Data uses — two independent settings),
|
||||
`history.rs` (rename history/undo
|
||||
log), `presets.rs` (up to 9 saved naming schemes) — all three
|
||||
stored as JSON in the OS app-config directory — `cli.rs` (the
|
||||
`-rename` command-line mode's orchestration: builds and executes a
|
||||
@@ -171,7 +178,9 @@ src/ React + TypeScript UI (Vite). Faithful recreation of the
|
||||
two-pane rename screen (Aurora theme) wired to real file loading,
|
||||
drag-and-drop, live naming-scheme preview, local TV/movie
|
||||
matching, metadata fetch for both (behind a Fetch Data Settings
|
||||
modal holding the TMDB/TVmaze source picker and the API token), a
|
||||
modal holding independent TV-source (TMDB/TVmaze/OMDb) and
|
||||
movie-source (TMDB/OMDb) pickers plus the TMDB token and OMDb key
|
||||
inputs), a
|
||||
confirm-before-touching-disk modal for the actual
|
||||
rename, a History panel that can undo a past rename, Align Up/Down
|
||||
list reordering, and a Presets panel (plus `1`-`9` hotkeys) for
|
||||
@@ -200,13 +209,13 @@ npm run tauri dev
|
||||
npm run tauri build
|
||||
```
|
||||
|
||||
Verified in the environment this was built in: `cargo test -p aurora-curator-core` (all
|
||||
passing, including the TMDB and TVmaze client tests — those run against a local mock
|
||||
HTTP server via `mockito`, no live network or API key needed to build/test), `cargo check -p
|
||||
aurora-curator` (compiles clean against real Tauri + GTK/WebKit system libraries), and `npm run
|
||||
build` (TypeScript type-checks, Vite bundles). The actual GUI window has **not** been
|
||||
visually verified anywhere yet — that sandbox has no display. Run `npm run tauri dev`
|
||||
on your machine to see and click through it for the first time.
|
||||
Verified in the environment this was built in: `cargo test --workspace` (all 128
|
||||
passing, including the TMDB, TVmaze, and OMDb client tests — those run against a local
|
||||
mock HTTP server via `mockito`, no live network or API key needed to build/test), `cargo
|
||||
check -p aurora-curator` (compiles clean against real Tauri + GTK/WebKit system
|
||||
libraries), and `npm run build` (TypeScript type-checks, Vite bundles). The actual GUI
|
||||
window has **not** been visually verified anywhere yet — that sandbox has no display.
|
||||
Run `npm run tauri dev` on your machine to see and click through it for the first time.
|
||||
|
||||
### Setting up metadata sources (for "Fetch Data")
|
||||
|
||||
@@ -214,22 +223,34 @@ Everything else in the app works fully offline; "Fetch Data" is the one feature
|
||||
talks to the network, and it's the only one that needs any setup at all — and even that
|
||||
setup is optional for TV.
|
||||
|
||||
TV episodes can resolve against either of two sources, picked in the app (click the key
|
||||
icon, "Fetch Data Settings", next to Fetch Data):
|
||||
TV episodes and movies each have their own independent source picker in the app (click
|
||||
the key icon, "Fetch Data Settings", next to Fetch Data) — a batch can freely mix TV and
|
||||
movie files resolved against two different sources at once:
|
||||
|
||||
- **[TVmaze](https://www.tvmaze.com/)** — free, no account or API token needed at all.
|
||||
Just pick it and go.
|
||||
- **[TMDB](https://www.themoviedb.org/)** — the default, and the only option for movies
|
||||
(TVmaze has no movie catalog). Needs a free account:
|
||||
- **[TVmaze](https://www.tvmaze.com/)** — TV only (it has no movie catalog). Free, no
|
||||
account or API token needed at all. Just pick it and go.
|
||||
- **[TMDB](https://www.themoviedb.org/)** — the default for both TV and movies. Needs a
|
||||
free account:
|
||||
1. Create a TMDB account, then go to Settings → API in your account and generate an
|
||||
**API Read Access Token** (not the older numeric "API Key" — Aurora Curator uses the
|
||||
Bearer token method TMDB documents as the default).
|
||||
2. In the app, open "Fetch Data Settings" and paste the token in. It's saved locally
|
||||
in the OS app-config directory and only ever sent to `api.themoviedb.org`.
|
||||
- **[OMDb](https://www.omdbapi.com/)** — TV and movies, an alternative to TMDB for
|
||||
either or both. Needs a free API key:
|
||||
1. Request a free key at <https://www.omdbapi.com/apikey.aspx> (OMDb emails it to you).
|
||||
2. In the app, open "Fetch Data Settings" and paste the key into the OMDb field. It's
|
||||
saved locally in the OS app-config directory and only ever sent to
|
||||
`www.omdbapi.com`.
|
||||
|
||||
A batch of TV-only files can run entirely on TVmaze with no token configured at all; a
|
||||
batch containing any movies still needs the TMDB token regardless of which TV source is
|
||||
selected.
|
||||
A batch of TV-only files can run entirely on TVmaze with no credential configured at
|
||||
all. Otherwise, whichever of TMDB/OMDb is actually selected — for TV, for movies, or
|
||||
both — needs its own credential saved first; picking TMDB for TV and OMDb for movies (or
|
||||
any other mix) only needs the two credentials that combination actually uses. Note OMDb
|
||||
returns a normal-looking (HTTP 200) "no results" response for both a genuine no-match and
|
||||
an invalid API key, so a bad key currently surfaces as "not found" rather than a clearer
|
||||
credential error — a known OMDb API limitation, not something Aurora Curator can
|
||||
distinguish from its response alone.
|
||||
|
||||
## Command-line usage
|
||||
|
||||
@@ -248,14 +269,15 @@ aurora-curator -rename --format "{show name} - {season number}x{episode number}
|
||||
aliases (`{show name}`, `{episode name}`, `{movie name}`, `{resolution}`, `{video
|
||||
codec}`, `{release group}`, …), or real Rhai script. `{name}`/`{ext}` fall back to the
|
||||
file's own current filename/extension when nothing else matched it.
|
||||
- `--db <tmdb|tvmaze>` (optional) — resolves TV episodes against that online source
|
||||
- `--db <tmdb|tvmaze|omdb>` (optional) — resolves TV episodes against that online source
|
||||
before rendering names, the command-line equivalent of clicking "Fetch Data" after
|
||||
Match. Movies are only looked up online when this is `tmdb` — TVmaze has no movie
|
||||
catalog, and with no `--db` at all every file uses local filename matching only, same
|
||||
as Match without Fetch Data in the GUI. `--db tmdb` needs a TMDB token that's already
|
||||
Match. Movies are also looked up online whenever this is `tmdb` or `omdb` — TVmaze has
|
||||
no movie catalog, so `--db tvmaze` only affects the TV half of a batch — and with no
|
||||
`--db` at all every file uses local filename matching only, same as Match without Fetch
|
||||
Data in the GUI. `--db tmdb`/`--db omdb` each need the matching token/key that's already
|
||||
been saved through the app's own Fetch Data Settings at least once — **the CLI never
|
||||
accepts an API token as an argument**, so there's nothing secret to leak into your
|
||||
shell history or a script.
|
||||
accepts an API token or key as an argument**, so there's nothing secret to leak into
|
||||
your shell history or a script.
|
||||
- `--action <move|copy|symlink|test>` (default `move`) — what to do at each computed
|
||||
target; `test` prints the full plan and touches nothing on disk, useful for checking a
|
||||
naming scheme before committing to it.
|
||||
@@ -312,21 +334,28 @@ ported from, for anyone picking this up:
|
||||
4. **Media detection** — `net.filebot.media.MediaDetection` (1356 lines): ties file-name
|
||||
parsing + matching together to auto-identify what a file is.
|
||||
5. **Web datasource clients** — `net.filebot.web.*` (~40 files): TheMovieDB, TheTVDB,
|
||||
AniDB, OMDb, TVmaze, OpenSubtitles, etc. Two are done: TMDB, for both TV and movies
|
||||
AniDB, OMDb, TVmaze, OpenSubtitles, etc. Three are done: TMDB, for both TV and movies
|
||||
(`crates/aurora-curator-core/src/web/tmdb.rs`, `reqwest` + `serde_json`, Bearer-token auth) —
|
||||
search-by-name plus per-season episode lookup for TV, search-by-title (optionally
|
||||
narrowed by release year via TMDB's own `primary_release_year` filter) for movies —
|
||||
and TVmaze, for TV only (`crates/aurora-curator-core/src/web/tvmaze.rs`, same `reqwest` +
|
||||
TVmaze, for TV only (`crates/aurora-curator-core/src/web/tvmaze.rs`, same `reqwest` +
|
||||
`serde_json` shape, no auth at all — TVmaze has no movie catalog to search, and its
|
||||
per-show episode endpoint returns every season in one flat list rather than TMDB's
|
||||
per-season lookup, so the client fetches once and filters locally, skipping any
|
||||
unnumbered/special episodes rather than panicking on them). Both are wired to "Fetch
|
||||
Data" — a user-selectable "TV episode source" picker in Fetch Data Settings chooses
|
||||
which of the two a batch's TV items resolve against (TMDB stays the default; movies
|
||||
always use TMDB regardless of that picker) — disambiguating multi-result searches via
|
||||
unnumbered/special episodes rather than panicking on them) — and OMDb, for both TV
|
||||
and movies (`crates/aurora-curator-core/src/web/omdb.rs`, same `reqwest` + `serde_json`
|
||||
shape but a single flat root-URL REST API rather than TMDB's per-resource paths, plain
|
||||
`apikey` query-param auth rather than a Bearer token, and human-text release dates
|
||||
(`"16 Jul 2010"`/`"N/A"`) normalized to ISO form locally; a movie search result only
|
||||
carries a bare year, so `lookup_movie` follows up with a by-ID detail request to get
|
||||
the actual release date). All three are wired to "Fetch
|
||||
Data" — independent "TV episode source" (TMDB/TVmaze/OMDb) and "Movie source"
|
||||
(TMDB/OMDb) pickers in Fetch Data Settings choose which source a batch's TV and movie
|
||||
items resolve against respectively (TMDB stays the default for both; a batch can mix
|
||||
sources across its TV and movie halves) — disambiguating multi-result searches via
|
||||
the similarity-scoring pass described in item 3 above rather than blindly trusting
|
||||
either source's top-ranked hit. All other sources (TheTVDB, AniDB, OMDb,
|
||||
OpenSubtitles) are not yet started.
|
||||
any source's top-ranked hit. All other sources (TheTVDB, AniDB, OpenSubtitles) are not
|
||||
yet started.
|
||||
6. **Rename engine + CLI** — `net.filebot.cli.CmdlineOperations` (1235 lines) and
|
||||
`ArgumentBean` (415 lines, the full flag surface: `-rename`, `--db`, `--format`,
|
||||
`--action`, `--conflict`, `-get-subtitles`, `-script`, etc.). The rename operation is
|
||||
@@ -348,7 +377,7 @@ ported from, for anyone picking this up:
|
||||
CLI flag surface is done too — `-rename`/`--format`/`--db`/`--action`/`--conflict`/
|
||||
`-non-strict`/`-h` (`crates/aurora-curator-core/src/cli` for pure argument parsing and
|
||||
directory expansion, `src-tauri/src/cli.rs` for the orchestration — local matching,
|
||||
optional TMDB/TVmaze lookup, and the actual rename, all without ever constructing a
|
||||
optional TMDB/TVmaze/OMDb lookup, and the actual rename, all without ever constructing a
|
||||
Tauri `App`); see "Command-line usage" above. `--output <dir>` and `-get-subtitles`/
|
||||
`-script`/the rest of FileBot's non-rename CLI modes are not ported — `-get-
|
||||
subtitles` and `-script` have no analog yet since subtitle-fetching and a script-mode
|
||||
|
||||
Reference in New Issue
Block a user