Closed QPixel closed 5 months ago
Tagging: @xou816 @Diegovsky @knokelmaat for a review :)
sup! I can't review exactly at this moment but I'll gladly do so sometime this week :)
thank you very much for your fix! I noticed spot not being able to load playlists for sometime now
Btw, I thought your comments were very thoughtful and helpful to whoever sees the code later. Thank you for taking the time to contribute :)
Can confirm this works, thank you :+1:
Hopefully this can get merged soon!
@QPixel I'm looking forward to you addressing my questions. It's looking 99% as-is, just waiting for this :)
This PR seeks to fix Spot's ability to load playlists.
Sometime around December 16th, Spotify broke the query string fields argument (#689). It now seems to be impossible to filter specific fields from larger objects. E.G. the artists field and albums field. Current behavior sees Spotify not returning the objects requested and depending on the order of the artists and albums field one will get returned while the other is not.
I spent a few hours messing around with the query string arguments and found a solution by not filtering the albums field which is seen here: https://github.com/xou816/spot/commit/56cf43625a1dc281daef3f74924d21d4a4a324bd
While this did fix the loading bug, it causes a lot more data to be sent than needed... So instead, it calls get_playlist_tracks in the initial loading of a playlist and separately add the song batch from that API call to the playlists song state.
Other Fixes
Spot crashing if a user tries to play a playlist with no songs Spot erroring if a user loads a playlist with no image
Note: I am more than happy to split these other fixes into multiple PRs if needed.