It appears that when a list of seeds is provided(genre, artist, track) only the first seed in the array is used by the recommendation api.
It looks like this is as a result of some mismatch between how the requests library unpacks the array as separate params in the GET, and how the Spotify api endpoint expects multiple seeds to be supplied (as a comma separated single param)
but the response reports on 1 seed where 2 were provided...
u'seeds': [{u'afterFilteringSize': 250, u'href': u'https://api.spotify.com/v1/artists/3dz0NnIZhtKKeXZxLOxCam', u'initialPoolSize': 250, u'type': u'ARTIST', u'id': u'3dz0NnIZhtKKeXZxLOxCam', u'afterRelinkingSize': 250}]
I've been working around by supplying the seeds as list with 1 item (i.e. ['3dz0NnIZhtKKeXZxLOxCam,3CjlHNtplJyTf9npxaPl5w'].. This gives me the second result above.
Same is true of genre (and I believe the track) seed params. I believe @mkb218 submitted a pull request for this original.
It appears that when a list of seeds is provided(genre, artist, track) only the first seed in the array is used by the recommendation api.
It looks like this is as a result of some mismatch between how the requests library unpacks the array as separate params in the GET, and how the Spotify api endpoint expects multiple seeds to be supplied (as a comma separated single param)
Example.... Spotipy's currently implemntation expands to the following request. https://api.spotify.com/v1/recommendations?seed_artists=3dz0NnIZhtKKeXZxLOxCam&seed_artists=3CjlHNtplJyTf9npxaPl5w
but the response reports on 1 seed where 2 were provided...
u'seeds': [{u'afterFilteringSize': 250, u'href': u'https://api.spotify.com/v1/artists/3dz0NnIZhtKKeXZxLOxCam', u'initialPoolSize': 250, u'type': u'ARTIST', u'id': u'3dz0NnIZhtKKeXZxLOxCam', u'afterRelinkingSize': 250}]
Passing the 2 seeds as a comma seperated param gives us the expected response. https://api.spotify.com/v1/recommendations?seed_artists=3dz0NnIZhtKKeXZxLOxCam,3CjlHNtplJyTf9npxaPl5w
response reports on 2 seeds...
u'seeds': [{u'afterFilteringSize': 250, u'href': u'https://api.spotify.com/v1/artists/3dz0NnIZhtKKeXZxLOxCam', u'initialPoolSize': 250, u'type': u'ARTIST', u'id': u'3dz0NnIZhtKKeXZxLOxCam', u'afterRelinkingSize': 250}, {u'afterFilteringSize': 250, u'href': u'https://api.spotify.com/v1/artists/3CjlHNtplJyTf9npxaPl5w', u'initialPoolSize': 250, u'type': u'ARTIST', u'id': u'3CjlHNtplJyTf9npxaPl5w', u'afterRelinkingSize': 250}]
I've been working around by supplying the seeds as list with 1 item (i.e. ['3dz0NnIZhtKKeXZxLOxCam,3CjlHNtplJyTf9npxaPl5w'].. This gives me the second result above.
Same is true of genre (and I believe the track) seed params. I believe @mkb218 submitted a pull request for this original.
Happy to take a swing at fix if you'd prefer.