From 0020687f7bb8cce35a9cab18fbe1e3d3f3e0e534 Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Tue, 11 Mar 2025 08:48:17 +0000 Subject: [PATCH] Include artist information in all albums feed --- lib/last_fm/feed.ex | 12 ++++++++++-- test/last_fm/feed_test.exs | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/last_fm/feed.ex b/lib/last_fm/feed.ex index a1165dee..f9b78bdb 100644 --- a/lib/last_fm/feed.ex +++ b/lib/last_fm/feed.ex @@ -54,9 +54,17 @@ defmodule LastFm.Feed do def all_albums do m = [ { - {:"$1", %{scrobbled_at_label: :"$2", album: :"$3", cover_url: :"$4"}}, + {:"$1", %{scrobbled_at_label: :"$2", album: :"$3", cover_url: :"$4", artist: :"$5"}}, [], - [%{scrobbled_at_uts: :"$1", scrobbled_at_label: :"$2", album: :"$3", cover_url: :"$4"}] + [ + %{ + scrobbled_at_uts: :"$1", + scrobbled_at_label: :"$2", + album: :"$3", + cover_url: :"$4", + artist: :"$5" + } + ] } ] diff --git a/test/last_fm/feed_test.exs b/test/last_fm/feed_test.exs index 50acaaad..1f1177ef 100644 --- a/test/last_fm/feed_test.exs +++ b/test/last_fm/feed_test.exs @@ -65,6 +65,7 @@ defmodule LastFm.FeedTest do assert [ %{ + artist: @track_two.artist, album: @track_two.album, cover_url: @track_two.cover_url, scrobbled_at_uts: @track_two.scrobbled_at_uts,