Already-matched movies predate the tmdb_collection_id column, so the collection gap rails were empty (only newly-enriched movies got the id). Add a self-healing backfill: each /discover/gaps load fills the franchise id for up to 20 owned movies missing it (eng.movie_collection reuses the matcher's belongs_to_collection read), recording 0 for movies with no franchise so they're not re-checked. The 'no-franchise' 0 is excluded from the rails. Backfill is wrapped/isolated so it can never break the gap response. Over a few Discover visits the whole library fills in and 'Complete the <franchise>' rails populate. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| music_database.py | ||
| personalized_schema.py | ||
| video_database.py | ||
| video_schema.sql | ||