getMediaMetadata
Sonos uses the getMediaMetadata
request to retrieve the track metadata given a unique ID.
Request parameters
Name | Type | Description |
---|---|---|
id | string(128) | Unique ID of the item. This ID should be unique across your whole service. |
Response
Name | Type | Description |
---|---|---|
mediaMetadataResult | complex | This is a mediaMetadata object. See SMAPI object types for details. |
Sample request (track)
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<getMediaMetadata xmlns="http://www.sonos.com/Services/1.1">
<id>track61</id>
</getMediaMetadata>
</soap:Body>
</soap:Envelope>
Sample response (track)
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.sonos.com/Services/1.1">
<s:Body>
<ns:getMediaMetadataResponse>
<ns:getMediaMetadataResult>
<ns:id>track61</ns:id>
<ns:itemType>track</ns:itemType>
<ns:title>Giorgio Moroder - Giorgios Theme</ns:title>
<ns:genre>Electronic</ns:genre>
<ns:mimeType>audio/mp3</ns:mimeType>
<ns:trackMetadata>
<ns:artistId>user:12345</ns:artistId>
<ns:artist>Williams Street Records</ns:artist>
<ns:genre>Electronic</ns:genre>
<ns:duration>459</ns:duration>
<ns:albumArtURI>https://example.com/image123-large.jpg?abc</ns:albumArtURI>
<ns:canPlay>true</ns:canPlay>
<ns:canSkip>true</ns:canSkip>
<ns:canAddToFavorites>true</ns:canAddToFavorites>
</ns:trackMetadata>
<ns:dynamic>
<ns:property>
<ns:name>LIKED</ns:name>
<ns:value>1</ns:value>
</ns:property>
</ns:dynamic>
</ns:getMediaMetadataResult>
</ns:getMediaMetadataResponse>
</s:Body>
</s:Envelope>
Sample request (stream)
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<getMediaMetadata xmlns="http://www.sonos.com/Services/1.1">
<id>sta00001</id>
</getMediaMetadata>
</soap:Body>
</soap:Envelope>
Sample response (stream)
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.sonos.com/Services/1.1">
<s:Body>
<ns:getMediaMetadataResponse>
<ns:getMediaMetadataResult>
<ns:id>sta00001</ns:id>
<ns:itemType>stream</ns:itemType>
<ns:title>LIVE!!!! In NYC!!!!</ns:title>
<ns:mimeType>audio/x-scpls</ns:mimeType>
<ns:streamMetadata>
<ns:logo>http://example.com/sta00001.png</ns:logo>
</ns:streamMetadata>
</ns:getMediaMetadataResult>
</ns:getMediaMetadataResponse>
</s:Body>
</s:Envelope>
Updated over 1 year ago