Answered

imported playlists - numerical sorting


Badge

In the sorting of playlists, could the app consider any numbers as numerical values, instead of as a strictly alphabetical string?

I imported numbered playlists from iTunes but the S2 app orders them like:

playlist 1

playlist 10

playlist 2

playlist 3 …

 

edit: I supposed the same question applies to sorting artists, album titles, and songs with numbers in the names, but it’s less of an issue here for me.

icon

Best answer by Corry P 12 May 2021, 10:41

View original

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.

14 replies

Userlevel 7

Add a “0” to the single digit playlists:

“playlist 01” rather than “playlist 1”

Badge

That works unless you have playlist numbers that exceed 100. You could start at 001 to fix that, but then that’s a whole lot of playlist name editing then re-indexing.

Userlevel 7
Badge +23

Why not give more meaningful names to your playlists?

Badge

They’re not actually named “playlist 1” etc. That was to provide a generic example.

I have done a few different radio shows that have over 100 episodes each. So playlists are named with the title of the show + the number of the episode. 

..Why not implement more intelligent sorting?

They’re not actually named “playlist 1” etc. That was to provide a generic example.

I have done a few different radio shows that have over 100 episodes each. So playlists are named with the title of the show + the number of the episode. 

..Why not implement more intelligent sorting?

  1. it’s totally logical - it’s the way computers sort. Just use 001, 002 etc and it works fine…
  2. I strongly doubt that Sonos will bother changing their software for what must be an even smaller group of users that NAS users, but good luck with that.
Badge
  1. it’s totally logical - it’s the way computers sort. Just use 001, 002 etc and it works fine…
  2. I strongly doubt that Sonos will bother changing their software for what must be an even smaller group of users that NAS users, but good luck with that.

I’ve not said it’s illogical. If you’re a machine, pure alphabetical sorting makes sense. I’ve asked for more intelligent sorting. Natural sort order, for the human user, makes *more* sense.

Natural sort order functionality is widely available, and implementing it would be a simple way to demonstrate that Sonos values the user experience.

Stick with purely alphabetical sorting, and you have to convince each user that ever asks why 11 should come before 2.  Seems pretty inefficient.

I’ve not said it’s illogical….. 


Stick with purely alphabetical sorting, and you have to convince each user that ever asks why 11 should come before 2.  Seems pretty inefficient.

The vast majority of people seem to have no trouble understanding it. 

Badge

I’m very surprised by the level of resistance to having the software treat numbers the way humans treat numbers, especially when code for natural sort ordering already exists in several languages. 

I’m very surprised by the level of resistance to having the software treat numbers the way humans treat numbers, especially when code for natural sort ordering already exists in several languages. 

I’m very surprised that you don’t understand a simple computing concept that has been around since the dawn of computing. It also seems odd to me that you don’t simply correct your file names so that they work properly.

I really have no problem if Sonos change their software to do what you want, as long as it’s optional of course, but I can’t see them wasting their resources on something that has such an obvious solution. Maybe I’m wrong, though….

Badge

I’m very surprised that you don’t understand a simple computing concept that has been around since the dawn of computing. It also seems odd to me that you don’t simply correct your file names so that they work properly.

I really have no problem if Sonos change their software to do what you want, as long as it’s optional of course, but I can’t see them wasting their resources on something that has such an obvious solution. Maybe I’m wrong, though….

 

I’ve demonstrated that I understand. I just disagree that this method of sorting should continue to be used when better solutions have since been developed and are readily available.

Your solution is to keep the old concept which requires a user to make potentially hundreds of edits to their own libraries, re-export the library files, then have Sonos re-index everything.  Multiply this by the number of libraries a user wants to import, and also by the number of users that would rather have the app read numbers as numbers.  Why insist that users go through all this when there’s a much simpler and elegant solution that’s already available?

I’ve demonstrated that I understand.

Well, you clearly didn’t, otherwise you’d have set up your numbering system differently - as I did and I would imagine most others here would have done.

I just disagree that this method of sorting should continue to be used when better solutions have since been developed and are readily available.

It’s not better, just different… 

Your solution is to keep the old concept which requires a user to make potentially hundreds of edits to their own libraries, re-export the library files, then have Sonos re-index everything.  Multiply this by the number of libraries a user wants to import, and also by the number of users that would rather have the app read numbers as numbers.

My solution simply means getting it right in the first place… I don’t know why someone who understands how sorting works would deliberately get it wrong - and then expect Sonos to implement coding to resolve their particular personal (and possibly unique) problem.

 

Userlevel 7
Badge +23

I am assuming the Sonos playlists are stored as actual files in the jffs filesystem, and I further surmise that the file system presents files in strict alphabetical order (I know NTFS does, I am guessing that jffs2 does in Linux). This allows a simple enumeration of playlists, with no actual requirement for ever sorting them.

A semantic sort, which is what the op would prefer, is obviously not going to be within any file system so has to be after the entire directory has been read. It also makes it harder to jump to “item N” in the directory, which is a critical feature for how every enumerable item works in the Sonos object system. Semantic sorts also get complicated when foreign languages come into play, as accented characters logical order disagrees with ascii sort order, plus there are a few languages that do not use the “Arabic” digits 0-9. I would further expect non-English users to want a semantic sort in a higher volume than users with numeric requests.

TL;DR its a tricky problem from a technical standpoint.

Badge

I see that natural sort ordering has actually been submitted as a feature request in the past. I’ll make a new request in hopes that it bumps it up in the list.  As Sonos imports iTunes playlists using the iTunes XML file, it’s not unreasonable to expect those playlists to be sorted the same way that iTunes does.

However, I appreciate the explanation as to why it may be tricky to implement. It’s at least more helpful than telling a user that they should’ve just set up their music libraries “correctly” in the first place - when the libraries were created long before the Sonos app. Obviously, natural sorting is/has been supported by other commonly used programs so it’s never been an issue until using the Sonos app.

Thanks anyways!

Userlevel 7
Badge +18

Hi @Ayoriver 

I have tagged this thread as a feature request and it will be seen by the relevant team. Thanks!