siftlode/backend/app/plex
npeter83 b3af04a997 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.
2026-07-11 03:10:02 +02:00
..
__init__.py feat(plex): P0 backend foundations — catalog model, config, client 2026-07-05 01:35:08 +02:00
client.py feat(plex): Plex-web-style 3-level series view (Phase 2 of series view) 2026-07-10 22:08:04 +02:00
paths.py feat(plex): P0 backend foundations — catalog model, config, client 2026-07-05 01:35:08 +02:00
stream.py feat(plex): multi-rendition audio (client-side switch) + reliable resume-on-F5 2026-07-08 22:25:03 +02:00
sync.py feat(plex): TV-show metadata sync + series filters (Phase 1 of series view) 2026-07-10 21:43:09 +02:00
watch_sync.py perf(plex): batch bulk pushes, cache show enrichment; remove dead code + DRY (F6/F8/F10) 2026-07-11 03:10:02 +02:00