Add statistics and data-consistency menus, recently-added folder

This commit is contained in:
2026-07-02 06:10:14 +02:00
parent b5c2023212
commit f0f38d4257
17 changed files with 498 additions and 78 deletions
+30
View File
@@ -21,13 +21,43 @@ Each version entry uses these sections (include only those that apply):
## Unreleased
## 1.7.0 — 2026-07-02
### Added
- **Nastavení → "Statistiky…"**: a library overview dialog — total movies, total
size, average ČSFD rating, with/without ČSFD link, untagged count, and a
per-category tag breakdown (counts sorted by frequency).
`FileManager.statistics()` aggregates it.
- **Testy menu → "Kontrola konzistence dat…"**: compares the pool index against
the actual files in pool/Filmy and reports **metadata without a file** (movie
deleted directly) and **files without metadata** (dropped into the pool without
importing). Read-only diagnosis (`FileManager.check_data_consistency`).
- **"- Nově přidané"** special folder in the Filmotéka: the **10** most recently
added movies as hardlinks (while **"- Tipy dne"** holds **15** random ones).
Import now records an **`added`** timestamp on each movie (`File.added`);
ordering falls back to the file's **mtime** for older items — not ctime, which
the hardlink generation itself bumps (`File.added_timestamp`,
`HardlinkManager.generate_recently_added`).
- Standalone **`scripts/tipy_dne.py`** to regenerate the "Tipy dne" folder
independently of the app (deployable on the server / cron): reads the pool
index, picks N random movies (default 15), clears the tips folder and recreates
the hardlinks. Stdlib only; paths via `--pool`/`--output` or the global config.
Ships with a systemd oneshot `tipy-dne.service` + daily `tipy-dne.timer`.
### Changed
- **Special folders are prefixed with "- "** so DLNA/TV browsers sort them ahead
of the genre folders at the output root: the grouping roots (now `- Dle roku`,
`- Dle země původu`, `- Dle hodnocení`, …) plus `- Tipy dne` and `- Nově
přidané`. Genre folders stay at the root, listed after the special ones.
### Fixed
- Obsolete-link cleanup now also removes **orphan links** in the tag tree —
hardlinks pointing at an inode no longer in the pool (movie re-imported /
replaced) — not just links whose current pool inode moved. Within a managed
folder, any file that isn't an expected link is swept, so leftovers from a
renamed layout (e.g. an old unprefixed `Dle roku`) are cleaned up on the next
generation instead of lingering forever.
## 1.6.0 — 2026-06-16
### Added