Manipulating the Sonos music library network share entries?

44 views
Skip to first unread message

Psychlist

unread,
Oct 15, 2019, 10:29:21 AM10/15/19
to SoCo - Sonos Controller
Hi, and thanks for the add to the group.

I'm wondering if it's possible to use SoCo (or some other method) to obtain and modify the list of music folder locations that comprise a Sonos music library? I.e., can I get the list of network share locations, and can I add/remove entries from that list?

(My use case is one where I'm autodetecting the addition of USB storage devices to a server, and sharing their contents on the network to make them accessible to Sonos. I'd like also to automatically add those shares to Sonos without the user being required to do so manually. Similarly, I'd like to remove the shares from the Sonos music library if the USB devices are removed from the server.)

Thanks,
Peter

DPH

unread,
Oct 16, 2019, 4:33:39 AM10/16/19
to SoCo - Sonos Controller
Hi Peter and welcome,
not aware that SoCo does this, but there must be a way. 
You would also need to trigger an update music library.

See what others come back with
Cheers David

Psychlist

unread,
Oct 16, 2019, 8:26:32 AM10/16/19
to SoCo - Sonos Controller
On Wednesday, October 16, 2019 at 9:33:39 AM UTC+1, DPH wrote:
Hi Peter and welcome,
not aware that SoCo does this, but there must be a way. 
You would also need to trigger an update music library.

Thanks for the response, David.

I'm already triggering a music library reindex (using SoCo) when a known USB device is reinserted, and that's working perfectly. It would just be nice to complete the automation by being able to manipulate the list of music library sources when a new USB device is inserted.

Hoping there's someone who's done this or has an idea of how it could be done. If it's feasible in principle, it could probably be added to SoCo.

Cheers,
Peter 

Kenneth Nielsen

unread,
Oct 17, 2019, 9:28:57 AM10/17/19
to SoCo - Sonos Controller
Hi Psyclist

I'm like 98% certain that I saw that option in the Sonos UPnP API, it just haven't had methods added to SoCo for it yet. If you are interested in contributing the feature, I'm willing to mentor/guide you through process.

In any case, this should be opened as a feature request issue on Github. Please feel free to do so if you like: https://github.com/SoCo/SoCo/issues

Regards Kenneth

Psychlist

unread,
Oct 17, 2019, 12:53:07 PM10/17/19
to SoCo - Sonos Controller

On Thursday, October 17, 2019 at 2:28:57 PM UTC+1, Kenneth Nielsen wrote:
Hi Psyclist

I'm like 98% certain that I saw that option in the Sonos UPnP API, it just haven't had methods added to SoCo for it yet. If you are interested in contributing the feature, I'm willing to mentor/guide you through process.

In any case, this should be opened as a feature request issue on Github. Please feel free to do so if you like: https://github.com/SoCo/SoCo/issues

Regards Kenneth

Thanks, Kenneth.

I've raised https://github.com/SoCo/SoCo/issues/678. I'm very happy to contribute to implementing this feature, if I'm pointed in the right direction.

Regards,
Peter
Reply all
Reply to author
Forward
0 new messages