The scan files no extras, so nothing copies an owner's ratings to them #250

Closed
opened 2026-10-11 12:42:22 +02:00 by Claude · 1 comment
Collaborator

Left from #247. The tree drops extras (extra_type.is_some() is filtered in crates/ephyra-app/src/scan/tree/movies.rs and shows.rs) and nothing writes ExtraType, so trailers, featurettes and theme media are not rows at all. Upstream files them as owned items and BaseItem.RefreshMetadataForOwnedItem (BaseItem.cs ~1658-1687) copies the owner's ratings, genres and studios to them when the extra set changed, an extra was renamed, or the refresh is full; otherwise only the dates.

crates/ephyra-db/src/scan/owned.rs selects stacked parts only (ExtraType IS NULL). When the scan files extras, the copy needs that condition added, and the fixture needs a rated film with an extra to measure it — the reference snapshot's one owned row has an empty owner.

Left from #247. The tree drops extras (`extra_type.is_some()` is filtered in `crates/ephyra-app/src/scan/tree/movies.rs` and `shows.rs`) and nothing writes `ExtraType`, so trailers, featurettes and theme media are not rows at all. Upstream files them as owned items and `BaseItem.RefreshMetadataForOwnedItem` (`BaseItem.cs` ~1658-1687) copies the owner's ratings, genres and studios to them when the extra set changed, an extra was renamed, or the refresh is full; otherwise only the dates. `crates/ephyra-db/src/scan/owned.rs` selects stacked parts only (`ExtraType IS NULL`). When the scan files extras, the copy needs that condition added, and the fixture needs a rated film with an extra to measure it — the reference snapshot's one owned row has an empty owner.
Author
Collaborator

Landed (on main up to the http extras commit), one review round. The scan files extras as upstream's FindExtras/RefreshExtras do — trailers as Trailer, theme songs as Audio, the rest as Video, owned, parentless, named and numbered as upstream names them — and hands them the owner's ratings, genres and studios when the extra set changed or on a full refresh, otherwise the dates. library_kinds no longer excludes extras, and a snapshot-backed test holds them to the upstream-written rows including ExtraType. The review's findings are fixed: SpecialFeatures, LocalTrailers, the theme routes, the two counts and the four has* filters answer from the rows; a parentless owned row (extra or stacked part) is refused with its owner's library, as upstream resolves it at read time while storing a NULL TopParentId; the sweep leaves extras of owner kinds the scan files none for. What remains is filed separately.

Landed (on main up to the http extras commit), one review round. The scan files extras as upstream's `FindExtras`/`RefreshExtras` do — trailers as `Trailer`, theme songs as `Audio`, the rest as `Video`, owned, parentless, named and numbered as upstream names them — and hands them the owner's ratings, genres and studios when the extra set changed or on a full refresh, otherwise the dates. `library_kinds` no longer excludes extras, and a snapshot-backed test holds them to the upstream-written rows including `ExtraType`. The review's findings are fixed: `SpecialFeatures`, `LocalTrailers`, the theme routes, the two counts and the four `has*` filters answer from the rows; a parentless owned row (extra or stacked part) is refused with its owner's library, as upstream resolves it at read time while storing a NULL `TopParentId`; the sweep leaves extras of owner kinds the scan files none for. What remains is filed separately.
Sign in to join this conversation.
No description provided.