Page 1 of 1

Folder sorting

PostPosted: Thu Aug 01, 2013 7:19 pm
by tombert
Serviio currently sorts the folders like:

Bravo Hits #1
Bravo Hits #10
Bravo Hits #2
...

I would like to propose sorting also based on [string length] which results in:

Bravo Hits #1
Bravo Hits #2
Bravo Hits #10
...

For example the Windows Explorer already does it that way.

thx

Re: Folder sorting

PostPosted: Thu Aug 01, 2013 7:31 pm
by zip
In that case you could end up with

  Code:
folder A
folder B
folder AB


It'd have to distinguish based on numbers, which might be difficult to do

Re: Folder sorting

PostPosted: Thu Aug 01, 2013 8:48 pm
by scottjoc
The easiest solution to this is to put a 0 before 1 digit seasons, then sort.

Like so

Season 01
Season 02
Season 10

When I have the folders view in Serviio it displays them in perfect order, but when I look in say the series view it looks like this

Season 1
Season 10
Season 2

I actually prefer the folders view because of this and use Mediarenamer to give the episode titles. I am a bit... OCD on things like this though.

Of course if a show had over 100 seasons it could be a problem again, might need 2 zeroes for that :P (I don't think many does)

Re: Folder sorting

PostPosted: Thu Aug 01, 2013 10:15 pm
by zip
That yes, and I think 1.3 fixes it for series. But these are actual folders on file system, where Serviio doesn't know some of the characters are numbers.

Re: Folder sorting

PostPosted: Fri Aug 02, 2013 11:06 am
by scottjoc
On my Xbox 360, if I use the series view, it shows seasons like this:

Season 1
Season 10
Season 2

Windows is guilty of this as well, if you don't stick a 0 in front of them.

I couldn't really know if 1.3 fixes it, I asked to be in the beta but never got a reply so I'll have to take your word on it.

Re: Folder sorting

PostPosted: Mon Aug 05, 2013 8:32 am
by mavack
It sorts alphabetically just like a library.

With Seasons i always use Season 01 02 03 etc

This is the same for music files from an album most good ripping programs have the ability to force the leading 0

so
01 - name
02 - name
03 - name

so that alphabetical sort works.

Re: Folder sorting

PostPosted: Sat Aug 10, 2013 7:20 pm
by tombert
zip wrote:In that case you could end up with

  Code:
folder A
folder B
folder AB


It'd have to distinguish based on numbers, which might be difficult to do


Windows File Explorer (W7) is doing this correctly ... (i tried now).
Whatever sort algorithm Microsoft is using - its cool.

thx

Re: Folder sorting

PostPosted: Sat Aug 10, 2013 7:32 pm
by tombert
I googled a bit. The sorting I mean is called "natural" or "lexicographical" sorting. Here are some shots for java:

http://www.java2s.com/Code/Java/Collect ... arator.htm
http://stackoverflow.com/questions/1022 ... iendly-way

thx
thomas