From 32454e8d5f441ec95703daa4f4c9cea3e4e1a525 Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Fri, 23 Jan 2026 08:32:55 +0000 Subject: [PATCH] Document missing artist MBIDs in Last.fm data --- lib/music_library/scrobble_activity.ex | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/music_library/scrobble_activity.ex b/lib/music_library/scrobble_activity.ex index 36839e14..bfd4ef61 100644 --- a/lib/music_library/scrobble_activity.ex +++ b/lib/music_library/scrobble_activity.ex @@ -345,6 +345,10 @@ defmodule MusicLibrary.ScrobbleActivity do @doc """ Gets the top artists by scrobble count across all time. Returns a list of maps with artist information and play counts. + + For a lot of artists, Last.fm doesn't have the correct artist musicbrainz_id + (often it's a ""), which makes this query not work as expected at the JOIN + level. To fix that, we need to update the data via Scrobble Rules. """ def get_top_artists(opts) do limit = Keyword.get(opts, :limit, 10) @@ -372,6 +376,10 @@ defmodule MusicLibrary.ScrobbleActivity do @doc """ Gets the top artists by scrobble count for the given number of days. Returns a list of maps with artist information and play counts. + + For a lot of artists, Last.fm doesn't have the correct artist musicbrainz_id + (often it's a ""), which makes this query not work as expected at the JOIN + level. To fix that, we need to update the data via Scrobble Rules. """ def get_top_artists_by_days(days, opts) do limit = Keyword.get(opts, :limit, 10)