When trying to analyze a playlist that has less than 50 tracks, the code that parses the artist id's doesn't format the query parameters right for the Spotify API call and then it returns a 400 response of "invalid id". This is because I was assuming that all playlists would be >= 50 tracks.
I added a check for playlists less than 50 tracks long, but I should probably make it more generalizable.
The reason this was an issue in the first place is that getting tracks returns 100 tracks, while getting artists only returns 50.. so I need to split the call up into two calls and merge the data at the end.
When trying to analyze a playlist that has less than 50 tracks, the code that parses the artist id's doesn't format the query parameters right for the Spotify API call and then it returns a 400 response of "invalid id". This is because I was assuming that all playlists would be >= 50 tracks.
I added a check for playlists less than 50 tracks long, but I should probably make it more generalizable.
The reason this was an issue in the first place is that getting tracks returns 100 tracks, while getting artists only returns 50.. so I need to split the call up into two calls and merge the data at the end.
Anyways, bug fixed for now.