Skip to main content
Like many users, we use Sonos in two different houses. We have two NAS's of music that I'm planning on keeping synchronized with RSYNC. What doesn't sync or cant get exported are Sonos Playlists. It would be great to be able to ad-hoc export them and then to import them as well. Using the UPnP interface, I've noted a Java program that can export playlists, but importing them is a bit troublesome. It would be great to have this feature.
Since the 10 update, SPL.PY no longer works. it comes back with a 'Discover returned no speakers'. Anyone know if this is a new problem or how to fix?
Since the 10 update, SPL.PY no longer works. it comes back with a 'Discover returned no speakers'. Anyone know if this is a new problem or how to fix?



totally unrelated to this thread, but yes, an xml change to Zone data from Sonos broke a number of third party integrations. See other threads about Savant, python-soco and others.
Not so totally unrelated, but thank you anyway

Hi folks,



I foolishly removed my napster account - then added the exact same Napster account back to Sonos (I was strengthening the password) - only to discover that the 10 years worth of playlists can no longer be referenced - ouch. Anybody come across this - or found a workaround?



I'd love to find a way to export the playlists - and am a developer by trade - so any hints toward a script that works with the latest firmware appreciated.



Aside from that - the only way out of this I see is to screengrab the page that displays the now broken playlists - OCR that grab - then import the csv via a trans-coder service into a native Napster playlist.



I've been in touch with Sonos support - and the response has been underwhelming - so am holding hope out for here...




waynef: Napster playlists are stored by Napster: a password change will not effect them. So are you referring to a Sonos playlist of Napster tracks? That can be extracted with a UPnP toolset, I use Intel Device Spy. If you install that I can tell you how to extract the playlist, then we should be able to see what changed and hopefully edit it, then re-save it.
Hi controlav: - yes that's exactly right - Sonos playlists seem to have dereferenced the Napster account - I expect some sort of internal ID associated to my Napster account has now changed. Sounds like a great approach you suggest - anything you can share much appreciated!
Looks like you are on an iPad, I have no idea what kind of UPnP tools are available on there, but here is the extraction info (using a PC):

http://blog.travelmarx.com/2011/01/extracting-sonos-playlist-simple-sonos.html

(Use SQ: as the arg to browse)

In the result find a playlist you want to recover. Do a Browse on its id (eg "SQ:42") and that will get you the actual playlist as xml. For each track there is a "res" tag, which will end with "sn=", it is the number that changed when you re-added the account. You'll need to figure out the new "sn" value (make a new playlist with a track from your new Napster account).

With this all done, the next trick is to upload the edited playlist. Let me know when you're ready for that.
Excellent - thanks for the pointers... I'll get my Win10 laptop onto the home LAN later this evening and have a play! Many thanks!
controlav, do you know if there is a way to import the playlists exported into Napster - such that I can use within Napster in addition to Sonos - and the pros and cons within? I guess the playlist management of Napster lists on Sonos is not great?
Hi controlav - I've used the post you pointed me toward - and I've got stuck into a bit of Java programming to create a routine that pulls all of the playLists within the Sonos system - and then dumps them into a single file. This file contains the title, artist, album, playlist name, playlist ID & sn (the ref to the Napster account I've messed up?) - and amongst all the results - I see "0,1,2,3 - and also others that are unknown (local storage mainly). What are next steps?



I'd like to hear opinions around whether I should be importing these directly into Napster from this point ?
Importing directly into Napster is hard, and requires the encryption to be broken on the music service credentials, plus then some non-trivial SMAPI code to create the playlists, so I don't think that is feasible unless you already have the decryption figured out.



To create a fresh Sonos playlist from a hand-fixed version of one you downloaded, you can use the UPnP tool of choice to:



Load the edited xml into the queue, and I am unsure of this as I have no code examples to look at. My best guess is first AVTransport.RemoveAllTracksFromQueue() to empty it (this I know works), then ContentDirectory.CreateObject("Q:0", xml-string)

but I am less sure about that second call. An UpdateObject might make more sense here.



Once the queue is loaded with the right stuff, call AVTransport.SaveQueue(0, playlistname, "") (playlistname must not already exist) to turn that into a playlist.
Hi controlav,



I got a response back from Sonos support - advising I use the external streaming playlist functionality! So I've dumped my huge export into a spreadsheet - and am cherry picking the lists into Napster via: https://soundiiz.com/webapp/playlists - so far it's working out OK - a little slow, but that's due to it all being copy and paste. I think I'll see how the UX works using Napster playlists for a while - if I get frustrated, I might be back here to revisit the queue import solution. Thanks for your help - wouldn't have managed to get this far without you.
waynef, couldn't you convert the xml into a playlist format that soundiiz can handle (with a bit of code eg a simple m3u file), then let soundiiz get that into Napster? (Just a suggestion, I've never used that service but coding to avoid a lot of copy & paste is always preferred 🙂
The soundiz platform only accepts one playlist at a time - it would have been worth importing a master file with playlist name etc. all defined within that file - but no batch import feature as yet. so either copy and past from a known spreadsheet - or import a load of individual files... I chose the former as it allowed me to see where I was up to 🙂 Works reasonably well - trick is to ensure you get artist and track title for the song to be recognised.
Out of curiosity, why do you think this is an important feature?

If you have more than one home, with a Sonos in each home, this saves all the effort of having to create a playlist in each home.
I see a lot of different questions in this thread. I agree with most of them, but I know this is difficult functionality to build for SONOS if it has to be really sophisticated - as desired over here 🙂.



I Just made a new request for a SIMPLE feauture to export playlists: https://en.community.sonos.com/ask-a-question-228987/please-make-a-basic-playlist-export-feature-available-6830816 . PLEASE gfive your support to get at least a simple start function...