A decentralized music tracking and discovery platform built on AT Protocol 🎵 rocksky.app
spotify atproto lastfm musicbrainz scrobbling listenbrainz

feat: refine get_artist_listeners query to focus on album_artist and simplify grouping

+3 -8
+3 -8
crates/analytics/src/handlers/artists.rs
··· 408 408 COUNT(*) as play_count 409 409 FROM scrobbles s 410 410 JOIN tracks t ON s.track_id = t.id 411 - WHERE t.artist = ? OR t.album_artist = ? 412 - GROUP BY s.user_id, s.track_id, t.artist, t.title, t.uri, t.album_artist 411 + WHERE t.album_artist = ? 412 + GROUP BY s.user_id, s.track_id, t.title, t.uri, t.album_artist 413 413 ), 414 414 user_top_tracks AS ( 415 415 SELECT ··· 469 469 )?; 470 470 471 471 let listeners = stmt.query_map( 472 - [ 473 - &artist.name, 474 - &artist.name, 475 - &limit.to_string(), 476 - &offset.to_string(), 477 - ], 472 + [&artist.name, &limit.to_string(), &offset.to_string()], 478 473 |row| { 479 474 Ok(ArtistListener { 480 475 artist: row.get(0)?,