Commit Graph
22 Commits
Author SHA1 Message Date
timothy 90534c4e65 fix(690,758): fix the three MediaCards sites instead of deferring them
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
2026-08-26 08:37:26 +02:00
Jason Dove 1c07df5bc3 use cancellation tokens in many places (#2350)
* use cancellation tokens everywhere

* more cancellation tokens
2025-08-27 03:20:35 +00:00
Jason Dove 5d081ceeff fix editorconfig and run code cleanup (#2324)
* fix formatting rules

* reformat ersatztv

* reformat ersatztv.application

* reformat ersatztv.core

* refactor ersatztv.core.tests

* reformat ersatztv.ffmpeg

* reformat ersatztv.ffmpeg.tests

* reformat ersatztv.infrastructure

* cleanup infra mysql

* cleanup infra sqlite

* cleanup infra tests

* cleanup ersatztv.scanner

* cleanup ersatztv.scanner.tests

* sln cleanup

* update dependencies
2025-08-16 14:44:48 +00:00
Jason Dove ab0f431c85 fix app startup with mysql (#2205)
* don't run pragma command on mysql

* add not required pathhash

* make media file path hash required

* update changelog
2025-07-26 17:48:03 +00:00
Jason Dove 71e9ea867a store local library folder hierarchy in db (#1616) 2024-02-16 06:16:19 -06:00
Jason Dove b2f7bcaf1e add more fields to music video credit templates (#1210) 2023-03-15 20:10:24 -05:00
Jason Dove 8ba6374165 music video nfo multiple artists (#780)
* support multiple artist entries in music video nfo metadata

* clean up other video and song etags
2022-05-02 12:32:15 -05:00
Jason Dove d67251bfa0 jellyfin and emby collection sync (#752)
* sync jellyfin and emby collections

* update changelog
2022-04-22 13:33:35 -05:00
Jason Dove c02b83d0d6 code cleanup (#743)
* update tools

* run code cleanup

* update dependencies
2022-04-19 17:47:18 -05:00
Jason Dove dcc8f19a6b remove transient IDbConnection (#678) 2022-03-05 14:06:27 -06:00
Jason Dove 1ab98578ab refactor namespaces and imports (#670)
* re-namespace

* optimize usings

* more usings

* more of the same

* more implicit/global usings

* cleanup all usings

* minor fixes
2022-03-03 15:36:07 -06:00
Jason Dove ea08453913 vaapi improvements (#629)
* fix interlaced video with vaapi

* downgrade imagesharp to fix blurhash generation

* fix ui crash loading collection editor
2022-02-10 20:19:59 -06:00
Jason Dove 685f78bef8 fix search results bug (#583) 2022-01-21 14:05:09 -06:00
Jason Dove afa52ccc89 add trash system for local libraries (#571)
* 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
2022-01-12 20:27:53 -06:00
Jason Dove d9d2cfa8be search index fixes (#559)
* add music video artist to search index

* properly index minutes field when adding from scan

* bump search index version
2022-01-06 10:28:53 -06:00
Jason Dove e6446f9983 better trakt lists (#384)
* better trakt list support

* update dependencies

* revert unneeded brackets
2021-09-25 09:12:25 -05:00
Jason Dove 0fb5bfde58 refactor dbcontext lifetime (#258)
* refactor create playout handler

* refactor get all playouts handler

* refactor delete playout handler

* remove dead code

* ignore unnamed artists for collections

* more repository cleanup

* more schedule items refactoring

* more playout refactoring

* refactor playout builder

* refactor ffmpeg profiles

* more ffmpeg profile refactoring

* rework resolutions

* refactor media collections

* refactor config elements

* update changelog

* more cleanup
2021-06-13 20:19:10 -05:00
Jason Dove aa0942384d fix removing deleted music videos (#156) 2021-04-09 05:34:28 -05:00
Jason Dove 2b26a5411c add artists as owners of music videos (#154)
* 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
2021-04-09 05:10:58 -05:00
Jason Dove 8fea24a3a5 add fallback metadata for music videos (#134) 2021-04-04 15:57:25 -05:00
Jason Dove 6b44873474 add library scan progress detail (#133)
* add library scan progress detail

* scan plex libraries on plex thread
2021-04-04 10:44:10 -05:00
Jason Dove 633586ddba add music videos library (#125)
* 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
2021-04-02 18:28:45 -05:00