Some spotify playlist cannot be read

Hello,

With the officiel spotify plugin, on some predefined playlist of spotify, I cannot open it or read it.
For example, select Spotify > “Genres & Moods” > Reggae :
Try to open Reggae Classic or Heavy dub : nothing append.

I activate verbose log and when I click on one of both, I have this message :

(node:1177) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): TypeError: Cannot read property 'url' of undefined

EDIT :
After added the flag --trace-warnings in node.js, I have this stack :

code TypeError: Cannot read property ‘url’ of undefined
at /data/plugins/music_service/spop/index.js:1463:38
at process._tickCallback (internal/process/next_tick.js:109:7[/code]

Regards,

Hello,

I found the problem.
In the file : /data/plugins/music_service/spop/index.js (l. 1463)
I replace :
albumart: track.album.images[0].url,
by

 albumart: (track.album.hasOwnProperty('images') && track.album.images.length > 0 ? track.album.images[0].url : ''),

Now it works fine !

I hope Volumio Team could integrate this quickly :slight_smile:

That’s good debugging zejohn! I just submitted a pull request with your change. My bad, always thought Spotify returned something for album art in that field.