0995aaa8af0ba486571b38450979e2eb14bc86d7
The web player kept no durable state, so a reload (and a return to /music, whose cwd resets) lost your place. Wire it to the platform's per-user /api/music/now-playing (same endpoints the app uses): - MusicPlayerHost persists a snapshot (track + position) on play/pause + track change + a 10s heartbeat (position read via ref so the heartbeat stays live). - On first load with an empty queue it restores that snapshot: rebuilds the album queue (sortTracks), loads it PAUSED (browsers block autoplay on reload), and seeks to the saved position once metadata is in. A restore guard stops the load from clobbering the saved position with 0. - MusicDetail auto-opens the currently-playing album once on mount (when it has no location yet), so /music lands on the track — without yanking you back after you navigate away. Adds loadQueue() (paused) to useMusicPlayer + a NowPlaying type. tsgo clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Description
No description provided
42 MiB
Languages
TypeScript
90.9%
Shell
4.7%
JavaScript
4.1%
CSS
0.2%
HTML
0.1%