perf(plex): batch bulk pushes, cache show enrichment; remove dead code + DRY (F6/F8/F10)

F6: coalesce whole-show/season Plex watch-pushes into ONE background task
(push_bulk_state_to_plex) that reuses a single DB session + keep-alive Plex
client, instead of scheduling one task (own session + HTTP client) per episode.

F8: cache a show's live Plex enrichment (metadata + related) per rating_key for
a short TTL and fetch the two calls in parallel; repeat opens skip the network.
Raw payloads are cached; per-user shaping stays out. An empty related list is not
cached (plex.related swallows a transient failure as [] — don't pin it for the TTL).

F10: remove dead code — the pre-unified /browse route + browse(), the /people
route + people() + _person_photo(), api.plexPeople, interface PlexPerson, and the
orphaned plex.people i18n block. DRY: appendPlexFilters() shared by plexLibrary +
plexFacets; one exported plexDetailUi.Filterable (was Fil + Filterable); PlexInfo
migrated onto the shared plexDetailUi hooks/menu (DetailCustomizeMenu gained
overlay + extra props; useDetailPrefs exposes savePref; PrefToggle exported).

Reviewed (high) → clean. F7 (facet aggregate collapse) deferred: self-exclusion
gives each sub-aggregate a distinct WHERE, and no measurement shows /facets slow.
This commit is contained in:
npeter83 2026-07-11 03:10:02 +02:00
parent 9f8e410033
commit b3af04a997
9 changed files with 180 additions and 450 deletions

View file

@ -93,13 +93,6 @@
"addShowCollection": "Zur Sammlung"
},
"playerSoon": "Player kommt bald — „{{title}}“",
"people": {
"match": "Personen",
"actor": "Schauspieler",
"director": "Regie",
"count": "{{count}} Titel",
"added": "hinzugefügt"
},
"collEditor": {
"manage": "Sammlungen",
"title": "Sammlungen — {{title}}",

View file

@ -93,13 +93,6 @@
"addShowCollection": "Add to collection"
},
"playerSoon": "Player coming soon — “{{title}}”",
"people": {
"match": "People",
"actor": "Actor",
"director": "Director",
"count": "{{count}} titles",
"added": "added"
},
"collEditor": {
"manage": "Collections",
"title": "Collections — {{title}}",

View file

@ -93,13 +93,6 @@
"addShowCollection": "Kollekcióhoz adás"
},
"playerSoon": "A lejátszó hamarosan jön — „{{title}}”",
"people": {
"match": "Személyek",
"actor": "Színész",
"director": "Rendező",
"count": "{{count}} cím",
"added": "hozzáadva"
},
"collEditor": {
"manage": "Kollekciók",
"title": "Kollekciók — {{title}}",