83b27d7ba1961e3f929e3a4d3b34972f270bf2d1
CI / validate-monitoring (push) Successful in 8s
CI / lint (push) Successful in 13s
CI / federation-interop (push) Successful in 1m39s
CI / test (push) Successful in 3m38s
CI / images (push) Skipped
CI / assets (push) Skipped
CI / python-package (push) Skipped
CI / trigger-deploy (push) Skipped
CI / notify (push) Successful in 5s
Root cause: gunicorn runs only 2 sync workers, and GET /api/v1/art/album did its MusicBrainz + Cover Art Archive work synchronously inside the request (2-12+ seconds per call, measured). A page with several uncached albums could tie up the entire application - every endpoint, every user - for as long as that took. Separately, even an already-resolved album re-streamed its image bytes live from Cover Art Archive on every single page view, by the original v1 design. The endpoint is now cache-only: it reads the album_art table and, if resolved, a local file, and never touches the network. A cache miss records a "pending" row and returns 404 immediately - the frontend already treats 404 as "show the placeholder," so no frontend changes are needed. A new background worker task (the same claim-with- FOR-UPDATE-SKIP-LOCKED pattern already used by imports and federation deliveries) does the actual resolving and downloads the image bytes to a shared volume, completely decoupled from any request. No migration needed: AlbumArt.status just gains a new "pending" value. Verified against the real docker compose stack (not just the test suite): cold lookups for 5 real albums all returned 404 in well under 0.2s (previously 2-12+s each), the worker resolved all 5 within ~10s in the background, and resolved art then served in single-digit milliseconds from the volume, including after a full container restart (no re-download). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011Hn2QwS1HRT8tFAzo8ew63
Scrobbler
A self-hosted music scrobbling service. It speaks the Last.fm (Audioscrobbler 2.0) API, so players and scrobblers that let you set a custom Last.fm server can use it unchanged. It also has a web UI for your listening history, and optional sharing on the fediverse (ActivityPub) — followable from Mastodon, with weekly summaries, milestones and now playing.
players / scrobblers ──► API /2.0/ Last.fm-compatible
web UI (static files) ──► API /api/v1/ JSON API for the UI
API ──► PostgreSQL
Prometheus ◄── API :9100/metrics, postgres-exporter ──► Grafana
Docs
- Admin guide — running a real instance: images, configuration, TLS, monitoring, backups, upgrades, troubleshooting.
- User guide — accounts and apps, connecting a player, importing history, sharing on the fediverse.
- Set up — working on the code: local dev environment, migrations, tests, CI/CD.
- API reference:
/api/openapi.json, Swagger UI at/api/docs, ReDoc at/api/redoc(a copy is committed atdocs/openapi.json). - Federation internals:
src/scrobbler/federation/README.md. Design docs for how it was built:docs/design/.
Try it
cp .env.example .env # then set SECRET_KEY and POSTGRES_PASSWORD
docker compose up -d # db, api (:5050), worker, ui (:8080)
Open http://localhost:8080, create an account, then go to Apps and create an app for a player. See docs/admin-guide.md for the published images, full configuration reference and production notes.
Licence
BSD 3-Clause; see LICENSE. The fonts vendored in frontend/fonts/ are under
the SIL Open Font License 1.1.
Languages
Python
84.4%
JavaScript
8.6%
HTML
3.1%
CSS
2.9%
Shell
0.7%
Other
0.2%