goon/app/models
jtrzupek c8baa11604 feat(api): device-scope user state (favorites/progress/blacklists)
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>
2026-06-10 08:58:01 +02:00
..
__init__.py feat(movies): watched/continue-watching tracking end-to-end 2026-05-28 23:24:06 +02:00
base.py Initial commit 2026-05-20 10:10:22 +02:00
blacklist.py feat(api): device-scope user state (favorites/progress/blacklists) 2026-06-10 08:58:01 +02:00
bug_report.py Initial commit 2026-05-20 10:10:22 +02:00
external_record.py Initial commit 2026-05-20 10:10:22 +02:00
favorite_movie.py feat(api): device-scope user state (favorites/progress/blacklists) 2026-06-10 08:58:01 +02:00
favorite_performer.py feat(api): device-scope user state (favorites/progress/blacklists) 2026-06-10 08:58:01 +02:00
favorite_scene.py feat(api): device-scope user state (favorites/progress/blacklists) 2026-06-10 08:58:01 +02:00
favorite_studio.py feat(api): device-scope user state (favorites/progress/blacklists) 2026-06-10 08:58:01 +02:00
ingest_run.py Initial commit 2026-05-20 10:10:22 +02:00
merge_candidate.py Initial commit 2026-05-20 10:10:22 +02:00
movie.py Initial commit 2026-05-20 10:10:22 +02:00
movie_playback_source.py Initial commit 2026-05-20 10:10:22 +02:00
performer.py perf(taxonomy): denormalize scene_count for tags/performers/studios 2026-05-31 17:53:48 +02:00
play_progress.py feat(api): device-scope user state (favorites/progress/blacklists) 2026-06-10 08:58:01 +02:00
playback_source.py Initial commit 2026-05-20 10:10:22 +02:00
scene.py Initial commit 2026-05-20 10:10:22 +02:00
source.py Initial commit 2026-05-20 10:10:22 +02:00
studio.py perf(taxonomy): denormalize scene_count for tags/performers/studios 2026-05-31 17:53:48 +02:00
tag.py perf(taxonomy): denormalize scene_count for tags/performers/studios 2026-05-31 17:53:48 +02:00