880 B
880 B
Last.fm Integration
Credentials
- Preferred: manage the Last.fm API key in
/admin/settings(persisted in DB; no restart required). - Env fallback:
LASTFM_API_KEY.
API Client
src/Service/LastFmClient.php(uses Guzzle)searchAlbums(query, limit)getAlbum(id)/getAlbums([ids])getAlbumWithTracks(id)getAlbumTracks(id)
Caching & Limits
- Last.fm responses are cached in Symfony cache pools to reduce repeated calls.
- Search/detail payloads are normalized to one internal album shape before persistence.
Ingestion Flow
- Search Last.fm
- Resolve tags/genres via
LastFmTagResolver - Persist or update album with
AlbumRepository::upsertFromExternalAlbum() - Persist tracks with
AlbumTrackRepository::replaceAlbumTracks()
Admin Settings
- Set the Last.fm API key in
/admin/settings. - Key changes apply immediately.