No artist or title for radio stream (SirusXM)
I have Sirius XM playing, and when I check the current track, I see:
{ title: 'x-sonosapi-hls:r:altnation?sid=37&flags=288', artist: null, album: null, albumArtURI: 'http://www.siriusxm.com/albumart/Live/1630/kopecky_562FC292_m.jpg', position: 27195, duration: 0, albumArtURL: 'http://www.siriusxm.com/albumart/Live/1630/kopecky_562FC292_m.jpg' }
The title is a weird URL, and the artist/album data is missing. Looking at the request, I see that the artist and title information is not where it is expected in the DIDL XML:
<DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns:r="urn:schemas-rinconnetworks-com:metadata-1-0/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/"><item id="-1" parentID="-1" restricted="true"><res protocolInfo="sonos.com-http:*:application/x-mpegURL:*">x-sonosapi-hls:r%3aaltnation?sid=37&flags=288</res><r:streamContent>BR P|TYPE=SNG|TITLE Talk To Me|ARTIST Kopecky</r:streamContent><upnp:albumArtURI>http://www.siriusxm.com/albumart/Live/1630/kopecky_562FC292_m.jpg</upnp:albumArtURI><dc:title>x-sonosapi-hls:r:altnation?sid=37&flags=288</dc:title><upnp:class>object.item.audioItem.musicTrack</upnp:class></item></DIDL-Lite>
node-sonos could look for the "r:streamContent" element, and if it exists, parse out TITLE and ARTIST from there.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
FYI, it looks like the r:streamContent field appears in other streams, but is blank, here's a Spotify DIDL:
<DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns:r="urn:schemas-rinconnetworks-com:metadata-1-0/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/"><item id="-1" parentID="-1" restricted="true"><res protocolInfo="sonos.com-spotify:*:audio/x-spotify:*" duration="0:04:00">x-sonos-spotify:spotify%3atrack%3a4kxND2rbPDrdb7Sgoo1Fbh?sid=12&flags=8224&sn=2</res><r:streamContent></r:streamContent><upnp:albumArtURI>/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a4kxND2rbPDrdb7Sgoo1Fbh%3fsid%3d12%26flags%3d8224%26sn%3d2</upnp:albumArtURI><dc:title>When You're Gone</dc:title><upnp:class>object.item.audioItem.musicTrack</upnp:class><dc:creator>Avril Lavigne</dc:creator><upnp:album>The Best Damn Thing</upnp:album></item></DIDL-Lite>
Thanks for doing the research @lazerdye. Unfortunately I'm tight on time for a few weeks. If you'd be up for opening a pull-request implementing the parsing of r:streamContent into the title/artist when dc:title etc. is missing I'd happily review and get merged sooner!
@lazerdye could you verify the above is still valid? That Sirius is still providing the title and artist in StreamContent?
If that is the case, could you re-open this issue and we’ll try to work it out.
Im not lazerdye but can verify this still happens
@lazerdye could you verify the above is still valid? That Sirius is still providing the title and artist in StreamContent?