Add edit dialogs, library organizer, and TMDb pool migration

This commit is contained in:
2026-09-08 07:37:40 +02:00
parent 39712d7283
commit 79c9e34a5d
10 changed files with 1371 additions and 110 deletions
+61
View File
@@ -21,6 +21,67 @@ Each version entry uses these sections (include only those that apply):
## Unreleased
### Fixed
- **Movies can live in mixed libraries.** The import/edit/move dialogs and the
library filter offered only `movie`-kind libraries (falling back to a default
"Filmy"), so a pool of only mixed/series/homevideo libraries had nowhere to put
a movie. They now use `libraries_accepting_movies` (kind **movie or mixed**),
and `load_pool_movies` scans a mixed library's **top-level** files as movies
(its subfolders are series). Movies can be imported into / moved between mixed
libraries.
- **Cleanup of leftover library folders.** After editing libraries, Curator now
offers to delete **empty** pool folders that are no longer a library, and lists
non-empty ones (never auto-deleted). `FileManager.orphan_pool_folders` /
`remove_empty_pool_folder`.
### Added
- **ČSFD link stored as a second DB pointer** (`File.csfd_url`) — captured at
import (new column in the movie import dialog) and editable in *Upravit film*.
Kept only as a pointer next to the TMDb id; nothing is fetched from ČSFD.
- **Series import into `mixed` libraries.** `series_libraries` (import target +
`load_series` scan) now covers kind `series` **and** `mixed`, so episodes can be
imported into a mixed library and show up in the series overview/editor.
### Changed
- **Movie edit dialog: dropped the free-form tags field**, added **ČSFD odkaz**.
(Genre tags come from the NFO; manual tag editing isn't needed in the Jellyfin
flow.)
- **Episode filenames now keep the original name:** `SxxEyy - {original}.ext`
(was `Series SxxEyy.ext`), inside `Series (rok) [tmdbid]/Season NN/`. The
`SxxEyy` code is stripped from the original before re-applying, so repeated
renames don't double it (`series.episode_body`); `episode_filename` /
`is_canonical_episode` and the series import/rename/edit paths follow.
### Added
- **Library organizer** (*Pool → "Knihovny…"*). One dialog manages the pool's
top-level libraries as ``{name, kind}`` — kinds **movie / series / mixed /
homevideo** — stored in a unified ``libraries`` setting in the pool index
(`FileManager.libraries` / `set_libraries`; the legacy `movie_libraries` /
`copyasis_folders` are now derived from it and synthesised for old pools).
Setting the pool creates a folder for every library. Replaces the separate
"Knihovny (rozdělení)" and "Copy-as-is složky" dialogs. **mixed** and
**homevideo** can be defined now; their scanning/generation lands in the next
phases (for now only movie + series libraries are processed).
- **Pool migration to TMDb** (phase 6; `src/core/migrate.py`, *Nástroje →
"Spárovat pool s TMDb (migrace)…"*). Matches existing movies (no `tmdbid` yet)
against TMDb by title + year and proposes an id, filling a missing year from
TMDb. Classification is conservative — **jisté** (exact diacritics-insensitive
title + matching year, unique), **nejednoznačné** (pick from candidates),
**bez shody**. A review dialog lets you apply just the confident ones or the
ones you pick; renames to `Title (rok) [tmdbid].ext`. Already-migrated files are
skipped, so it is re-runnable. `FileManager.match_pool_to_tmdb` /
`assign_tmdb_id` drive it.
- **Consolidated edit dialogs.** *Filmy → "Upravit film…"* (double-click a row)
opens one dialog for every Curator-owned parameter of a movie — title, year,
TMDb ID (with "Dohledat z TMDb"), library, date, free-form attributes and tags
— and applies them at once (rename `Title (rok) [tmdbid].ext`, move between
libraries, set metadata) via `FileManager.apply_movie_edits`. In *Seriály →
"Přehled seriálů…"* a series now opens an editor (double-click / "Upravit
seriál…"): edit the series' title/year/TMDb ID/library **and each episode's
season/episode number**, which renames the folder and lays the episodes out as
`Series SxxEyy.ext` (`FileManager.apply_series_edits`). The double-click on a
movie now edits it; "Otevřít" (playback) stays in the context menu.
## 1.12.0 — 2026-08-31
### Added