Feature Request: Export and Import Sonos Playlists

  • 25 February 2013
  • 216 replies
  • 28930 views

Userlevel 4
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.

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.

216 replies

Userlevel 1
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...
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.
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.
Userlevel 7
Badge +23
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 🙂
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.
Userlevel 7
Badge +23
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'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 ?
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?
Excellent - thanks for the pointers... I'll get my Win10 laptop onto the home LAN later this evening and have a play! Many thanks!
Userlevel 7
Badge +23
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.
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!
Userlevel 7
Badge +23
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 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...

Not so totally unrelated, but thank you anyway
Userlevel 7
Badge +23
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.
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?
I'd like to add my vote for some way to export a playlist. I use Google play. Created a 3000 song playlist in Sonos . I'd like to have it available in Google play. It is frustrating. Using pc app I can scroll through the complete playlist. In the drop-down menu at the playlist level, a save/export as xml would be a nice feature.
It is not a 'nice to have', it is an absolute necessity given the number of users that have lost their playlists (like me) and the length of this thread, And the solution is so easy to implement, and has been proposed many times before.How did you lose your playlists, please?
Userlevel 5
Badge +10
It is not a 'nice to have', it is an absolute necessity given the number of users that have lost their playlists (like me) and the length of this thread, And the solution is so easy to implement, and has been proposed many times before.

Out of curiosity, what is this "easy to implement" solution? There's no in-built Sonos ability to write to local filesystems, no cloud storage with your Sonos account, and providing raw API endpoints for the brave isn't really the Sonos style. So how would you suggest implementing an "export playlist" feature?
It is not a 'nice to have', it is an absolute necessity given the number of users that have lost their playlists (like me) and the length of this thread, And the solution is so easy to implement, and has been proposed many times before.
I am sure that we can agree it is a nice to have. I have never yet come across a situation, personally or on this forum, where a factory reset of a whole system was genuinely necessary. I manage my playlists between two locations by taking a Play:1 with me. It isn't perfect but I understand why Sonos have other priorities.
Userlevel 2
My music is backed up, my playlists which I've created over years are not. When I had issues with Sonos previously a factory reset was the fix; lost everything and had to rebuild what I had then. Time has moved on and the playlists are bigger.

Would also mean that I'm able to replicate these playlists in the two locations I go between (network drives and file layouts are backed up between the locations so they're identical).

I'd also like other 'stupidly basic' features which would be helpful but it seems Sonos aren't interested in those either.
e.g Actual track location (e.g. file name/directory) to be shown where it's streaming from. Would be ideal for hunting out quickly duplicate tracks, but this is not the place to bring those up.
Out of curiosity, why do you think this is an important feature?
Userlevel 2
Yes, none of which I use or have a need for.


They're that low on Sono's priority list that this request thread has been open for five years. Lost count of the number of updates they've pushed out in that time.
So Alexa, Spotify Connect and Airplay 2 are not free new features? Radio.com? Perhaps you mean that the particular features you want are low on Sonos' priority list?