mirror of
https://github.com/rommapp/romm.git
synced 2026-11-29 10:01:00 +01:00
Move the per-play status update (last_played, now_playing, and the finished/empty -> incomplete rewind) off the optimistic launch-time write and onto play-session ingest, so it reflects real play and is recorded once. Backend: ingest now updates rom_user status when a session is the newest play, leaving deliberate statuses (completed_100 / retired / never_playing) untouched and skipping backfilled older sessions so they can't resurrect now_playing. Frontend: new usePlaySession composable records a session and ingests it on exit; wired into Ruffle and Stream. EmulatorJS already ingests via the embedded v1 Player, so its launch-time recordLaunch is dropped. The dead recordLaunch / applyLaunchStatus helpers are removed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>