Existing DBs created movies.tmdb_id / shows.tvdb_id as inline UNIQUE (can't be dropped via migration). The new model allows the same title in >1 library, so a second movie/show with the same id raised IntegrityError and the scanner SKIPPED it — dropping the title (observed: 'UNIQUE constraint failed: movies.tmdb_id', movie 548522 skipped). upsert_movie/upsert_show_tree now use a shared _resilient_upsert: on IntegrityError, retry WITHOUT the id columns so the row is stored (just without the colliding id) — same pattern enrichment_apply already used. Regression tests for both movies and shows under a simulated legacy unique index. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| music_database.py | ||
| personalized_schema.py | ||
| video_database.py | ||
| video_schema.sql | ||