Skip to content

feat(site): see who else listens to an artist, track or album - #260

Merged
mmattbtw merged 1 commit into
mainfrom
feature/site-music-pages
Dec 4, 2026
Merged

mmattbtw merged 1 commit into
mainfrom
feature/site-music-pages

Conversation

@mmattbtw

@mmattbtw mmattbtw commented Dec 4, 2026

Copy link
Copy Markdown
Member

The site shows what people listen to, but there was no way to go from a song to the other people playing it. Artists, tracks and albums now have their own pages, with top listeners, top tracks and albums, and recent listens. Names in every list link to them.

  • Music is found by name in any case, so "Charli xcx" and "Charli XCX" share a page. A play counts towards its first artist only, as on the leaderboards.
  • Track titles in lists now open the track page. The link to the music service is still on the listen's own page.

Before merging, create the index these pages need on the production HappyView database. Existing databases don't pick it up automatically, and without it every page view scans all plays:

CREATE INDEX CONCURRENTLY IF NOT EXISTS teal_plays_artist
  ON teal_plays (lower(artist), played_at DESC, rkey DESC);

Tested against a local HappyView with the last hour of plays, including names with slashes, question marks and accents. On 8.3M synthetic rows, the stats queries I timed for the most-played artist took under 200 ms each with the index.

Each shows who listens to it most and who just did. Names in every list link to them. HappyView reads + in a query literally, so spaces now go out as %20.
@mmattbtw
mmattbtw merged commit 0ac4dfa into main Dec 4, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant