fix(rec): preserve enriched metadata + enrich source & library rows #14
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/tmdb-metadata-enrichment"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Three bugs in TMDB metadata population were causing cards to render with
NULL director/cast/genres/runtime in production:
upsertRecsAndMetadata wiped already-enriched recs to NULL on every
30-day refresh. The merge() upserted every rec with details=undefined
for ones it had skipped fetching. Now split into "full" rows (merge
all columns) and "thin" rows (merge only the columns we always have
from the recommendations payload).
Source rows (the rated item itself) only ever got a sparse stub from
library data and were never enriched. New enrichSourceRow helper
fetches details for the source and upgrades pre-existing sparse rows.
Unrated library items had no enrichment path at all — they only got
rich metadata if they happened to be recommended from someone else's
rating. Added a second work type to the TMDB worker that finds
library.tmdb_ids whose media_metadata is missing or has genres NULL,
and enriches them via the new enrichLibraryItem.
202 tests passing (was 184). New integration tests cover all three
paths plus the worker loader filter.
f6b81836532a1178e806