Update Library HTTP request

  • 30 July 2018
  • 2 replies
  • 518 views

Userlevel 2
Hi - can I force a ‘Update Music Library’ request via HTTP command?
I want to create a script on my server so when I add songs to my library folder it will send a request to Sonos to update the library.
Thanks

This topic has been closed for further comments. You can use the search bar to find a similar topic, or create a new one by clicking Create Topic at the top of the page.

2 replies

Userlevel 4
Badge +14
See https://en.community.sonos.com/advanced-setups-229000/update-music-index-from-url-39934 and https://en.community.sonos.com/advanced-setups-229000/simple-script-to-update-music-library-via-linux-23585

I see now that the xml body has been hidden since they migrated to the new forum. I'll update the answer with a correct xml payload when I get the chance.
Userlevel 4
Badge +14
The XML body should look like this:

code:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<u:RefreshShareIndex xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1">
<AlbumArtistDisplayOption></AlbumArtistDisplayOption>
</u:RefreshShareIndex>
</s:Body>
</s:Envelope>