I'm very happy with my little Sonos setup - it's sufficiently hackable because it's all upnp based, and although the supported desktop controllers are only on Windows and Mac, I can do most things I want through the Android controller app. One thing I could not do, until now, was manually update the music index. As I'm going through all my CD's re-ripping them at a higher bitrate and putting in higher quality covers this is a bit of a pain. I have the music index scheduled for 2am each morning, but would still like to be able to add in a new album and update it straight away, without resorting to WINE (not allowed on the work computer, and I'm not terribly fond of using it anyway - it seems like 'cheating'!). A couple of minutes with wireshark (again, not on my work computer!) allowed me to see the wonderous SOAP call which does the trick. I cobbled together the following script, and hey presto! it works. Don't forget to change the IP address to be one of your zones. You'll also need curl installed:
#!/bin/sh
curl -H 'SOAPACTION: "urn:schemas-upnp-org:service:ContentDirectory:1#RefreshShareIndex"' -X POST -H 'Content-type: text/xml' -d @updateIndex.txt 192.168.1.73:1400/MediaServer/ContentDirectory/Control
updateIndex.txt:
<s:envelope s:encodingstyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:body><u:refreshshareindex xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1"><albumartistdisplayoption></albumartistdisplayoption></u:refreshshareindex></s:body></s:envelope>