Post Reply 
Basic error in numerical sorting of album names
12-01-2014, 03:36
Post: #6
RE: Basic error in numerical sorting of album names
(11-01-2014 17:31)simoncn Wrote:  
(11-01-2014 16:51)DavidL Wrote:  I have just installed MinimServer on my Synology DS412+ and in general I am very impressed with its capabilities, however the sorting of album names including numbers from a MinimServer library scan has a fundamental error in the algorithm used.

This is not an error. The default sort uses an alphabetical collating sequence. If you need custom sorting of album names, you can use the ALBUMSORT tag to do this.

I tend to sympathize with DavidL here, and I think the sort could sometimes be done in a more "natural" way.

As a first example, if on Windows you create the following four files:
t-1.txt
t-10.txt
t-20.txt
t-2.txt
you will see that they are displayed in that following order in Explorer "detail" view :
t-1.txt
t-2.txt
t-10.txt
t-20.txt
So Windows routinely sort "numbers" in a natural ascending order inside file names. On Linux, one can try this :
% touch t-1.txt t-10.txt t-20.txt t-2.txt
% ls -v t-*.txt
% t-1.txt t-2.txt t-10.txt t-20.txt
On Linux, the '-v' switch can be set to sort numbers in a "natural" ascending order inside file names.

My point is that it is possible to achieve a more pleasing sort sequence of strings which embed numbers by using a more refined sorting algorithm instead of following a strictly aplhabetic collating sequence. The algorithms are there in the OS's, as shown above. I personnaly cannot see any advantage to sticking to pure alphabetic sorting, and why one would not prefer to see by default "t-1 t-2 t-10 t-20" instead of "t-1 t-10 t-2 t-20". Pure alphabetic sorting just does not look and feel right when strings embed numbers. I agree that the use of "...SORT" tags can solve these sorting issues, but this can amount to double the work involved in tagging the album titles, and maintaining the integrity of those titles following a change. Those "...SORT" tags can be really usefull to solve complex sorting issues, but in my humble opinion, they are a bit an overkill for the problem at hand, when refining the sorting algorithm could more cleanly achieve the same result.

Regards
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Basic error in numerical sorting of album names - Andre Gosselin - 12-01-2014 03:36

Forum Jump:


User(s) browsing this thread: 1 Guest(s)