The media server pre-matches shows/movies (tmdb_id set), so the enrichment matcher skips them and never fetches TMDB details — leaving details-only fields like `status` (airing vs ended) blank on almost the whole library. That's why the watchlist's airing-shows default only ever saw the handful of shows whose detail page had been opened (the one path that force-fetches details). Library here: 3,371 matched shows, only 18 with status. Fix: a one-time-per-item details backfill that runs in the enrichment worker's idle loop (after the episode-sync pass). New `details_synced` marker column on shows+movies; detail_backfill_next/mark_details_synced/pending_count; worker._detail_backfill_one() re-fetches an already-matched item's TMDB details and gap-fills (never clobbers server data), then marks it done so it's attempted once. No re-scan needed — it heals the existing library in place, and once status is populated the airing-watchlist reflects real TV. It's a background gap-fill on already-matched items (like episode coverage), so it doesn't block the worker's 'Complete' status. kettui: DB seam tests + worker tests (fills status / enrich-by-id / marks-done-when-absent). ruff + isolation guards green; 94 enrichment tests pass. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| music_database.py | ||
| personalized_schema.py | ||
| video_database.py | ||
| video_schema.sql | ||