rinukkusu / spotify-dart

A dart library for interfacing with the Spotify API.
BSD 3-Clause "New" or "Revised" License
206 stars 92 forks source link

PlayHistory track artists images is always null #133

Open idanmaman2 opened 1 year ago

idanmaman2 commented 1 year ago

hi , when I fetch from recentlyplayed and get Iterable of PlayHistory the artist image is null , plz fix it , Best regards and thanks for the package Idan .

rinukkusu commented 1 year ago

Looking at the docs it seems Spotify doesn't return a full Artist object, but rather just the ArtistSimple one, which doesn't contain an artist image.

Screenshot from when executing the endpoint in the developer console:

grafik

The fix for us is: use the simple class instead of the full artist class.

The fix for you is: grab each artist with spotify.artists.get('<id>'); or spotify.artists.list([<id1>, <id2>, ...]);

Thanks for bringing it to our attention!

rinukkusu commented 1 year ago

Looking again, the docs don't clearly state what should be returned in the recentlyPlayed endpoint and even just getting a track didn't return the full artist object, even though the docs state it should be returned. Maybe not a bug and just Spotify API weirdness ...