mirror of
https://github.com/Footsiefat/zspotify
synced 2021-12-21 22:06:14 +01:00
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.
This commit is contained in:
parent
b62f6bea7f
commit
8a450fd1ee
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user