Link Search Menu Expand Document

Metadata explained

A lot of requests to sonos require Metadata. This metadata is an xml describing the requested song.

The metadata for an item can usually be fetched from a remote music service, but talking to those is hard.

Known metadata

Some metadata can be guessed based on common URLs.

Spotify Album

  • Identifier: spotify:album:{id}
  • Track URI: x-rincon-cpcontainer:1004206cspotify:album:{id}?sid=9&flags=8300&sn=7
<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="0004206cspotify:album:{id}" restricted="true">
    <upnp:class>object.container.album.musicAlbum</upnp:class>
    <desc id="cdudn" nameSpace="urn:schemas-rinconnetworks-com:metadata-1-0/">SA_RINCON2311_X_#Svc2311-0-Token</desc>
</item>
</DIDL-Lite>

Spotify Artist Radio

  • Identifier: spotify:artistRadio:{id}
  • Track URI: x-sonosapi-radio:spotify:artistRadio:{id}?sid=9&flags=8300&sn=7
  • Sample ID: 72qVrKXRp9GeFQOesj0Pmv
<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="100c206cspotify:artistRadio:{id}" restricted="true">
    <upnp:class>object.item.audioItem.audioBroadcast.#artistRadio</upnp:class>
    <desc id="cdudn" nameSpace="urn:schemas-rinconnetworks-com:metadata-1-0/">SA_RINCON2311_X_#Svc2311-0-Token</desc>
    <dc:title>Artist Radio</dc:title>
</item>
</DIDL-Lite>

Spotify Artist Top Tracks

  • Identifier: spotify:artistTopTracks:{id}
  • Track URI: x-rincon-cpcontainer:100e206cspotify:artistTopTracks:{id}?sid=9&flags=8300&sn=7
<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="100c206cspotify:artistTopTracks:{id}" restricted="true">
    <upnp:class>object.container.playlistContainer</upnp:class>
    <desc id="cdudn" nameSpace="urn:schemas-rinconnetworks-com:metadata-1-0/">SA_RINCON2311_X_#Svc2311-0-Token</desc>
</item>
</DIDL-Lite>

Spotify Playlist

  • Identifier: spotify:playlist:{id}
  • Track URI: x-rincon-cpcontainer:1006206cspotify:playlist:{id}?sid=9&flags=8300&sn=7
  • Sample ID: 5HllTKEvYoHAwODZdwKw9W
<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="1006206cspotify:playlist:{id}" restricted="true">
    <upnp:class>object.container.playlistContainer</upnp:class>
    <desc id="cdudn" nameSpace="urn:schemas-rinconnetworks-com:metadata-1-0/">SA_RINCON2311_X_#Svc2311-0-Token</desc>
</item>
</DIDL-Lite>

Spotify Track

  • Identifier: spotify:track:{id}
  • Track URI: x-sonos-spotify:spotify:track:{id}?sid=9&flags=8224&sn=7
  • Sample ID: 3nDZHJ43uRF3fZGEMIjZ0b
<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="spotify:track:{id}" restricted="true">
    <upnp:class>object.item.audioItem.musicTrack</upnp:class>
    <desc id="cdudn" nameSpace="urn:schemas-rinconnetworks-com:metadata-1-0/">SA_RINCON2311_X_#Svc2311-0-Token</desc>
    <dc:title></dc:title>
</item>
</DIDL-Lite>

Spotify User Playlist

  • Identifier: spotify:user:{id}
  • Track URI: x-rincon-cpcontainer:1004206cspotify:user:{id}?sid=9&flags=8300&sn=7
<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="10062a6cspotify:user:{id}" restricted="true">
    <upnp:class>object.container.playlistContainer</upnp:class>
    <desc id="cdudn" nameSpace="urn:schemas-rinconnetworks-com:metadata-1-0/">SA_RINCON2311_X_#Svc2311-0-Token</desc>
    <dc:title>User's playlist</dc:title>
</item>
</DIDL-Lite>

Contribute

This page is generated from metadata.json, which you can download here.