Files
romm/backend/handler/database
Georges-Antoine Assi a951f7eb0b feat(v2): pin any media to the game overview
The overview's media section was fixed to scraped screenshots plus videos.
Each user can now pin any screenshot (scraped, game folder, their own or a
community upload), any artwork and any video to their own overview, in any
order.

Pins live on rom_user.pinned_media as an ordered list of stable keys
(scraped:<url>, file:<id>, screenshot:<id>, artwork:<key>), written through
the existing PUT /roms/{id}/props. NULL keeps the default selection, so
nothing changes until a user pins or unpins something, and "Reset to
default" returns to it. Keys whose media disappears are skipped, not
pruned.

- The Artwork subtab's shelf becomes MediaShelf, shared with the overview.
- The Screenshots subtab gains a read-only "Scraped" section so scraped
  screenshots can be unpinned too.
- Toggles are optimistic and chained so rapid clicks land in order.
- pinned_media is left out of the per-user sort cache bump.

Supersedes #4512.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 17:42:17 -04:00
..