Tristan Peralta

Libraries 2026

lastfmc3

A Last.fm client for C3: sign in, scrobble, and find similar music.

lastfmc3 wraps the parts of the Last.fm API a music application needs: signing in, recording plays, and finding similar music. It sends HTTP through httpc3 and returns typed structs rather than raw maps.

Sign-in

Desktop flow: get_token, show the user the approval URL (or open it), then get_session. The session key does not expire; the application stores it and passes it to calls that need a user. Signed requests compute api_sig for you — the MD5 of the sorted parameters plus the application secret.

Scrobbling, honestly

update_now_playing and scrobble are separate calls. Scrobbles are sent in batches of up to 50, and each returns a ScrobbleResult: Last.fm can ignore a play and still report success, so the result says which plays were accepted and which were not. That distinction is the difference between a client that reports the truth and one that silently loses plays.

Discovery and history

track_similar and artist_similar take a name or a MusicBrainz ID, with a limit and autocorrect. recent_tracks returns a page of listening history with paging and a time range; what the user is playing now is kept separate from plays.

Results are typed: Track, Artist, Image, Session, ScrobbleResult, RecentTracks, with MusicBrainz IDs when Last.fm has them. Artist images are a single placeholder picture on Last.fm’s side, and the structs say so rather than pretending otherwise.

Status

In development, not released. Glaze is the first caller; the roadmap lists what is left.