goon/app/api
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 Initial commit 2026-05-20 10:10:22 +02:00
admin.py Initial commit 2026-05-20 10:10:22 +02:00
admin_html.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_reports.py Initial commit 2026-05-20 10:10:22 +02:00
device.py feat(api): device-scope user state (favorites/progress/blacklists) 2026-06-10 08:58:01 +02:00
expo_updates.py session work: bug-report fixes + WIP cleanup 2026-05-25 22:02:52 +02:00
favorites.py feat(api): device-scope user state (favorites/progress/blacklists) 2026-06-10 08:58:01 +02:00
me.py feat(api): device-scope user state (favorites/progress/blacklists) 2026-06-10 08:58:01 +02:00
movies.py feat(api): device-scope user state (favorites/progress/blacklists) 2026-06-10 08:58:01 +02:00
playback.py perf(movies+scenes): direct-play #hash movie hosters; skip empty blacklist filters 2026-06-06 19:44:41 +02:00
scene_favorites.py feat(api): device-scope user state (favorites/progress/blacklists) 2026-06-10 08:58:01 +02:00
scenes.py feat(api): device-scope user state (favorites/progress/blacklists) 2026-06-10 08:58:01 +02:00
schemas.py perf(scenes): bounded count + has_more for filtered scene lists 2026-05-31 19:24:26 +02:00
seo.py feat(seo): public HTML SEO router + templates; add CLAUDE.md; ignore .nimbalyst 2026-05-31 16:29:59 +02:00
sources.py session work: bug-report fixes + WIP cleanup 2026-05-25 22:02:52 +02:00
stream_proxy.py fix(proxy): stable image-proxy URLs so expo-image actually caches thumbnails 2026-06-09 09:45:22 +02:00
taxonomies.py feat(performer): replace dev Re-scrape button with top-tag chips 2026-06-08 11:56:26 +02:00
watch.py feat(api): device-scope user state (favorites/progress/blacklists) 2026-06-10 08:58:01 +02:00