Both cold reviews (different model families) independently rated the deferral
MEDIUM, and the deciding fact I had not checked when I deferred: each of the six
repository methods involved has exactly ONE caller — the dead handler. Zero
blast radius, so "cheap and safe" beat "dead code, leave it", and leaving a
known instance of the mechanism this PR's own record establishes is what rots.
- GetSeasonCount expanded to the same Title+Year show set GetPagedSeasons pages
(it counted only the requested ShowId, so the same show present in two
libraries under-reported: count 2 against a 5-row page).
- GetEpisodeCount and GetMusicVideoCount now count the METADATA table their
pages are taken from, not the item table. An item whose metadata row was lost
to a scanner failure — a state FindOrphanPaths and RemoveMetadata both model —
inflated the total and produced the permanently-empty-page symptom.
The 1-based pageNumber on these three is a separate defect against
api.paging-zero-based and stays open in #832, which is now narrowed to that plus
the delete-or-keep question.
Mutation proof: restoring all three pre-fix counts turns all four new
MediaCardsCountMatchesPageTests red.
Two findings that only appeared by writing those tests, both now pinned or
recorded rather than left as folklore:
- GetSeasonCount has a third answer — with no ShowMetadata row there is nothing
to expand from, so GetPagedSeasons returns nothing and the count must be 0,
not the show's season total. Pinned as its own case.
- The episode page can be narrower than even the metadata count: its include
chain walks Episode -> Season -> Show -> ShowMetadata and a missing Show drops
every row. So "count the table the page reads" is necessary and NOT sufficient
wherever an include chain can filter. Recorded in the record and #832 rather
than claimed closed.
Also from review: docs/README.md's row now resolves the rule by KEY through the
catalog rather than hard-linking record paths, per the catalog-first convention
it was violating.
refs #832
* flag local movies as file not found
* show warning icon on cards
* unflag movie that is found during scan
* skip missing files when building playouts
* add state to search index
* add file not found health check
* link to search from file not found health check
* support flagging other media kinds as file not found
* continue to schedule missing items
* support episode files not found
* wip trash page
* fix trash url
* trash page is functional
* update changelog
* fix changelog merge
* clean up genre, tag, studio orphans
* enforce foreign keys at connection level
* wip
* fix fragment scroll offset
* fix see all link for music videos
* add fake artist metadata
* not null artist id
* add artist scanning
* remove improperly named music videos
* code cleanup
* add artists to search results and collections
* clean up music video metadata / artist
* add artist view
* show music videos on artist page
* add music video artwork placeholder
* add music videos library
* add music video tables
* first pass at music video library scan
* support music videos in playouts
* display music videos in search results and collections
* fix music video thumbnails
* remove some obsolete fields