From 8a450fd1eec8465c5a8cf90e7df1909ec7a45330 Mon Sep 17 00:00:00 2001 From: jonathan2384 <93066841+jonathan2384@users.noreply.github.com> Date: Tue, 26 Oct 2021 12:58:11 +0900 Subject: [PATCH] Fix for #127 Simple change to include ?include_groups=album%2Csingle in the api request when function get_artist_albums is used. Sorry if there is something wrong with this, I have not used Python before. It seems to work as expected in my testing. --- zspotify/album.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zspotify/album.py b/zspotify/album.py index 19004d1..2070da2 100644 --- a/zspotify/album.py +++ b/zspotify/album.py @@ -33,7 +33,7 @@ def get_album_name(album_id): def get_artist_albums(artist_id): """ Returns artist's albums """ - resp = ZSpotify.invoke_url(f'{ARTIST_URL}/{artist_id}/albums') + resp = ZSpotify.invoke_url(f'{ARTIST_URL}/{artist_id}/albums?include_groups=album%2Csingle') # Return a list each album's id album_ids = [resp[ITEMS][i][ID] for i in range(len(resp[ITEMS]))] # Recursive requests to get all albums including singles an EPs