Fix downloading by artist.

Modifying the scripts to include the query include_groups=album,single will only cause albums and singles made by the specific artist to be downloaded, avoiding unnecessary downloads.
This commit is contained in:
Logykk 2021-10-26 20:42:40 +13:00 committed by GitHub
commit 87419e18a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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