Feature Request: Export and Import Sonos Playlists

  • 25 February 2013
  • 216 replies
  • 28974 views


Show first post
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

Out of curiosity, why do you think this is an important feature?
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.
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?
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.
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?
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?
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.
Not so totally unrelated, but thank you anyway
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 ?
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...
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.
Userlevel 1
Badge
For what it's worth, you can connect to the Sonos with Media Monkey (even the free version) and access the playlists. From there you can save the playlist as m3u. I had to use a text editor from there to do some formatting cleanup, but it did work. Also allowed me to see my duplicates in the listing and help organize it better. Makes for a decent solution for exporting from one Sonos to another, or backing up your playlists.
Unbelievable how Sonos can irritate their biggest fans! ... I stopped using sonos playlists all together and use Spotify to manage my playlists ... My biggest irritation is the arrogance of not even explaining why exporting/importing and sorting playlists are not being offered.
I guess once you've bought into their product line they have no reason to listen to you anymore. Although it does give you incentive to look at other options.
Userlevel 2
Medimonkey findet Sonos Playlisten unter Medienserver/Saved Queues. Diese kann ich markieren und mit Strg+E in eine Wiedergabeliste exportieren.

Diese exportierte Liste habe ich dann in Excel geöffnet, absteigend von a-Z sortiert und dann unter Daten die Duplikate entfernt.

Wie bekomme ich sie jetzt wieder in Sonos zurück?

l.G.

Frank
Userlevel 2
Badge +2
Have to say that Sonos is constantly updating the software, and offering people the opportunity to help improve it, and while I'm 100% behind the basic ability to export playlists, I'm very happy with the kit overall. I've taken to saving playlists to Spotify - not ideal, and I have to pay to do that. It's time we had an answer on this - there's obviously a reason they've not enabled it, maybe copyright? I really don't know... Come in mods - step in and give us a proper response - we know you're listening 😉
I agree. But that's why it is so odd that there is no official response to this. Most of the time if I have some small thing, customer support is quick and good. And really this doesn't seem like something that hard?
Userlevel 2
Badge +2
I'm with you Douwe! I assume that enabling the saving/export of playlists has some kind of knock-on affect that end-users are missing - it's all guesswork from our point of view isn't it? I lost all of my playlists last year - gutting.
Userlevel 2
As selzhanik mentioned, you CAN export sonos playlists. Mediamonkey is free and it can see your sonos playlists just as easily as it can see your music library. Just export them as m3u files to any folder on your computer that you like. You can even set mediamonkey to export them every night as a backup.
Userlevel 2
Badge +2
As selzhanik mentioned, you CAN export sonos playlists. Mediamonkey is free and it can see your sonos playlists just as easily as it can see your music library. Just export them as m3u files to any folder on your computer that you like. You can even set mediamonkey to export them every night as a backup.
It's a good call and I intend looking into it , but it's not everyone who wants to reorganise the back end of their media set up to safeguard their playlists, when an option built into the Sonos software would be straightforward. 'Save/import your playlists'
Userlevel 2
Hello Selzhanik,

can we work on it together?

I can find the Sonos-Playlists in MediaMonkey under Medienserver/Saved Queues

This I can export with Strg+E in an m3u file.

In Excel I delete duplicates, save it as a .txt file and then rename it to m3u.

But the list has entries like:

npsdy:Tra.54658904.mp3.

all other lines start with

x-file-cifs://

This list I cannot open with any player. Can you give me a hint?

Regards

Frank
Userlevel 1
Badge
So what you're having trouble with is the "I had to use a text editor from there to do some formatting cleanup".  Depending on your technical expertise, this could be obvious or complicated.

This process is going to differ based on what kind of operating system you have, media player that needs to read the playlist, and so on.  I have a Windows Home Server 2011 most of the music is stored on, a Windows 7 desktop and I'm using many different media players throughout the house (though WinAmp and iTunes most often).  So your mileage may vary.  I used Scintilla Text Editor to edit the m3u file (I use SciTE for all kinds of things on a daily basis).

The first thing I had to do was find all of the XML-unfriendly characters that had been replaced by "%XX" and change them back into the actual characters.  The most common replacement was the space character.  I replaced every "%20" with a single space (" ").  After that was the ampersand -- replaced every "%26" with "&".  Then I simply searched the file for all other "%" characters and made the other edits *.  I used a simple ASCII table (see http://www.ascii-code.com/ as an example) when I didn't know the codes already.

* One thing I would note (and I had only one instance of this): UTF-8 characters.  They show up as consecutive codes, like "%xx%xx".  My example was "\\HOMESERVER\Music\Local\Salvador\Salvador\05 - La Monta%c3%f1a.flac" which I changed to "\\HOMESERVER\Music\Local\Salvador\Salvador\05 - La Montaña.flac".  The actual file name has a single lowercase n with a tilde ("ñ").  I did not need to replace the "ñ" with "ñ" to get my playlist to work.  I suppose if I did, I'd probably need to name the file with an m3u8 extension (I possibly should have anyway).  For more info on these codes, see http://en.wikipedia.org/wiki/UTF-8.

The second thing I had to do was for every line that started with "x-file-cifs://" (which was EVERY line my particular playlists) I had to convert remove the "x-file-cifs:" and replace each / with \.  Thus, my entry "x-file-cifs://HOMESERVER/Music/Local/Pearl Jam/Backspacer/03 - The Fixer.flac" became "\\HOMESERVER\Music\Local\Pearl Jam\Backspacer\03 - The Fixer.flac".

The third thing I had to do was replace each colon that was left with a semi-colon.  It appears the Sonos replaces ";" with ":" in their behind-the-scenes listings.  I searched for ":" and replaced with ";".  An example is "\\HOMESERVER\Music\Local\Yes\Highlights: The Very Best of Yes\04 - I've Seen All Good People: Your Move-All Good People.flac" going to "\\HOMESERVER\Music\Local\Yes\Highlights; The Very Best of Yes\04 - I've Seen All Good People; Your Move-All Good People.flac"

And after all that, my playlist worked in WinAmp and iTunes.
Userlevel 1
Badge
Chris Glynn - what do you mean by "and offering people the opportunity to help improve it"?  If I had the opportunity to contribute to the Sonos code-base, I'd probably do so...  Did they open-source it somewhere?
This is a good workaround and it helps for some problems. Not for importing the play list again though.