Add Last.fm scrobbling integration
Summary
- Scrobble tracks to Last.fm as you listen during the sorting workflow
- OAuth-style auth flow via Settings page (connect/disconnect)
- Automatic now-playing updates on track start, scrobble after 50% playback or 4 minutes
Changes
- New
settingsDB table for storing Last.fm session key - Last.fm API client with signature generation (
src/lib/server/api/lastfm.ts) - 6 API routes under
/api/lastfm/(status, auth, callback, disconnect, now-playing, scrobble) - Client-side scrobble tracker (
src/lib/scrobble.ts) hooked into both list and random views - Last.fm connection card on Settings page
-
LASTFM_API_KEYandLASTFM_API_SECRETenv vars
Setup
- Add
LASTFM_API_KEYandLASTFM_API_SECRETto env/docker-compose - Connect via Settings page