Set Spotify artist albums limit to 50
Add limit=50 to spotify_client.get_artist_albums so up to 50 albums/singles/compilations are returned per request, reducing the need for extra pagination and ensuring more complete discography results from a single call.
This commit is contained in:
parent
3c0d1fc187
commit
fff8e62070
1 changed files with 1 additions and 1 deletions
|
|
@ -27006,7 +27006,7 @@ def get_spotify_artist_discography(artist_name):
|
||||||
print(f"🎵 Found Spotify artist: {artist.name} (ID: {spotify_artist_id}, confidence: {highest_score:.3f})")
|
print(f"🎵 Found Spotify artist: {artist.name} (ID: {spotify_artist_id}, confidence: {highest_score:.3f})")
|
||||||
|
|
||||||
# Get all albums (albums, singles, and compilations)
|
# Get all albums (albums, singles, and compilations)
|
||||||
all_albums = spotify_client.get_artist_albums(spotify_artist_id, album_type='album,single,compilation')
|
all_albums = spotify_client.get_artist_albums(spotify_artist_id, album_type='album,single,compilation', limit=50)
|
||||||
|
|
||||||
if not all_albums:
|
if not all_albums:
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue