Post Reply 
Basic error in numerical sorting of album names
16-01-2014, 17:36
Post: #31
RE: Basic error in numerical sorting of album names
(16-01-2014 02:21)Andre Gosselin Wrote:  Playlists names are just file names with the extension removed, and the sad fact is that, under Windows, the file names would correctly sort without the leading 0's in the work numbers. Similarly under Linux, if directory contents is listed using "ls -v" command. With this in mind, I risk the following suggestion :
Implement an option applicable to browsing the [folder view], allowing the user to either use the current sort technique, or sort using the underlying OS commands known to "generally" produce what is for some a more "natural" sort order (eg "ls -v" on Linux, default directory listing on Windows). Minimserver could run this command in the background, and pipe its output in place of what the current sort procedure generates. (I am guessing a bit here, but I used this technique a lot when I was programming in the Python language). Of course, in doing so, a user must be ready to accept whatever nasty results this may produce in some circumstances.

Because the folder view is just a way to look the OS directory structure, I think it would be acceptable to allow recourse to some OS specific internals to generate a directory listing. For an example along the same line, some characters are not allowed inside filenames on Windows (colons for ex.), but they are on Linux. Consequently, the OS requirements must be taken into account when playlists are named.

I understand that this suggestion does not apply to the album tags sorting issue, but it could certainly alleviate the similar playlist sorting issue.

Regards

Thanks for this description of how you are using playlists. Your suggestion of using an OS directory listing would work for folders that contains only playlists, but it wouldn't work for folders that contain any other items. This is because folder view uses the Title tag of the item for display and sorting purposes, not the filename of the item. Playlists are a special case because they don't have a Title tag, so MinimServer uses the filename as the title.

Also, I would prefer to keep the browsing behaviour of MinimServer (including how lists are sorted) consistent across all platforms. The Java-based implementation currently ensures this. I think cross-platform consistency in the browsing experience is a key feature of MinimServer, and I wouldn't wish to change this unless absolutely necessary.
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 - simoncn - 16-01-2014 17:36

Forum Jump:


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