Public instance has no accounts, so all user state was GLOBAL in DB — new users saw/overwrote each other's (and Jan's) favorites, watched badges and blacklists (bug 2026-06-10). Add device_id (VARCHAR 64) to 9 state tables with composite PK (device_id, entity_id); app sends X-Device-Id header (get_device_id dep). All favorites/scene-favorites/blacklist/watch + scene&movie list/detail (is_favorite, watched, blacklist-hide) now filter by device. Existing rows backfilled to 'legacy-shared'; POST /me/adopt-legacy reassigns them to the caller once. Old clients (no header) map to legacy-shared so they keep working until OTA updates. Migration 0022: add col, backfill, composite PK. Verified on prod: 967 progress rows preserved, device isolation holds (new device sees none of legacy state). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| base.py | ||
| blacklist.py | ||
| bug_report.py | ||
| external_record.py | ||
| favorite_movie.py | ||
| favorite_performer.py | ||
| favorite_scene.py | ||
| favorite_studio.py | ||
| ingest_run.py | ||
| merge_candidate.py | ||
| movie.py | ||
| movie_playback_source.py | ||
| performer.py | ||
| play_progress.py | ||
| playback_source.py | ||
| scene.py | ||
| source.py | ||
| studio.py | ||
| tag.py | ||