Skip to content

Add Last.fm scrobbling integration

jedmund requested to merge jedmund/lastfm-scrobbling into main

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 settings DB 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_KEY and LASTFM_API_SECRET env vars

Setup

  1. Add LASTFM_API_KEY and LASTFM_API_SECRET to env/docker-compose
  2. Connect via Settings page

🤖 Generated with Claude Code

Merge request reports

Loading