Storage was already per-server (movies/shows UNIQUE(server_source, server_id), episodes via per-server show_id, prune_missing scoped) — but reads returned every server's rows, so a Jellyfin scan would show up alongside Plex. Mirror the music standard: scope reads to the active video server (resolve_video_server). query_library, calendar_upcoming, dashboard_stats and library_id_for_tmdb take a server_source; the dashboard/library/calendar endpoints pass it. server_source=None keeps "all servers" (enrichment processes every server; tests unchanged). No schema change, no data migration — existing Plex data is untouched and simply hidden while Jellyfin is the active server. Regression tests: same title on both servers stays two rows; scoped reads only return the active server's data; deep-scan prune never touches the other server. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| music_database.py | ||
| personalized_schema.py | ||
| video_database.py | ||
| video_schema.sql | ||