Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No artist or title for radio stream (SirusXM) #106

Open
lazerdye opened this issue Nov 8, 2015 · 4 comments
Open

No artist or title for radio stream (SirusXM) #106

lazerdye opened this issue Nov 8, 2015 · 4 comments

Comments

@lazerdye
Copy link

lazerdye commented Nov 8, 2015

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&amp;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&amp;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.

@lazerdye
Copy link
Author

lazerdye commented Nov 8, 2015

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&amp;flags=8224&amp;sn=2</res><r:streamContent></r:streamContent><upnp:albumArtURI>/getaa?s=1&amp;u=x-sonos-spotify%3aspotify%253atrack%253a4kxND2rbPDrdb7Sgoo1Fbh%3fsid%3d12%26flags%3d8224%26sn%3d2</upnp:albumArtURI><dc:title>When You&apos;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>

@bencevans
Copy link
Owner

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!

@svrooij
Copy link
Collaborator

svrooij commented Jan 5, 2018

@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.

@svrooij svrooij closed this as completed Jan 5, 2018
@spjoes
Copy link

spjoes commented Jun 24, 2022

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?

@svrooij svrooij reopened this Jun 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants