Rockbox Development > Feature Ideas

Sorting in Files section - Make files sort same way as folders do (COMPLETED)

(1/2) > >>

questions2000:
iPod / Linux
This could be viewed as a bug or a new setting to be added.

For me sorting is often an issue on all machines/devices, toughest thing to get the way I prefer.
At first I was surprised because so far Rockbox folder name sorting in the "Files" section appears to be almost perfect.
However, I recently noticed an inconsistency between how folders sort compared to how files sort, they are different.

I am hesitant to make this post because I do not want to lose the sorting method used currently for folders.
This observation has to do with "symbol" characters.

Commonly used "symbols" that are often used in media filenaming are....
dashes -
parentheses (  )   

Below I will provide some examples of how folders and filenames currently sort.

-----------------------------------------------------------------------------------------------------------------------------------------------------------------
FOLDER SORT EXAMPLES
(default sorting for folders works great, this sorting method makes sense to me and is preferred)

DASH
Text
Text - Text

PARENTHESIS
Text
Text (Text)

Text
Text (2)
Text (3)
Text (10)

-----------------------------------------------------------------------------------------------------------------------------------------------------------------
FILENAME SORT EXAMPLES
(Different then folder sort, not desired)

DASH
Text - Text.mp3
Text.mp3     (to me, this would be the original/main version of the name before any dash suffixes are added, I view as being above the others)

PARENTHESIS
Text (Text).mp3
Text.mp3

Parentheses are commonly used by others as suffixes when naming media files.
Here are some examples/explainations below

FILENAME PARENTHESES EXAMPLES
These examples are how filenames currently sort

Sequential Numbering
Text (2).mp3
Text (3).mp3
Text (10).mp3
Text.mp3       (to me this is viewed as "1" and should be above "2")

Indicator For "Live" Version
To me the original version should be above the "Live" version
Artist - Song (Live)
Artist - Song

Indicator For "Featured Artist"
Similar example to one mentioned above, if two versions of a song, one with main artist only and one with a featured artist, seems that the original would be above the featured
Main Artist - Song Name (ft. Artist)
Main Artist - Song Name

To me in every scenario I can think of, parentheses suffixes should always be below the main item without them above.
Same goes for dashes as well.
As mentioned, currently the folder sorting used in Rockbox does this exactly.

-----------------------------------------------------------------------------------------------------------------------------------------------------------------
SUGGESTION
If everyone agrees with the above (to match current folder sorting method), then I would say to make filename sorting match the default sorting method currently used for folders exactly.

If any developers/users do not all agree, then I would say to make both folder and filenames match regardless, but then add a new "sort" based setting that contains two options
Symbol Sorting
-Sort symbols above (which is currently used for filenames)
-Sort symbols below (which is currently used for folders)

Hopefully others agree and hopefully this will be considered to be updated in the future.
Thank you to anyone who reads this

speachy:

--- Quote from: questions2000 on April 21, 2025, 07:19:54 PM ---At first I was surprised because so far Rockbox folder name sorting in the "Files" section appears to be almost perfect.
However, I recently noticed an inconsistency between how folders sort compared to how files sort, they are different.

--- End quote ---

Filename sorting is done purely on the basis of the numerical value of the current character being compared.

("Filename" in this context _includes_ directories)

What you're effectively asking for is a type of "Semantic" sorting, and that's not something that's likely to be implementable given the multi-lingual nature of rockbox and the very limited resources we tend to have on these players.

Patches welcome, of course.


questions2000:
Thank you for your reply.
I apologize I am not sure I follow.

Might not know what you meant by this
("Filename" in this context _includes_ directories)

If folders already sort this way, then why would filenames be different?
Again I am sorry.
To me it seems like they should be the same (as mentioned, ideally filenames to match the current way folders sort)

I would have no idea on how to achieve something like this.
Would any other developers be interested in adding something like this?
Guess it could be offered as a "sort" setting if other users/developers prefer this current folders sorting different then filename method.

For me, sorting issues can kind of mess up the user experience, have had similar issues in Linux at times as well.
Hopefully someone will be interested in something like this.

Thanks again

speachy:
These are the _only_ sorting rules/mechanisms that rockbox implements:

 * TYPE (eg audio, playlists, plugins, bookmarks, text files, images, etc.  Type is derived from the extension, but the extension itself is not used in the sorting)
 * DATE
 * ALPHA (ie ordered by comparing the numerical codepoint of each individual character.  This can be problematic for languages that are not English)

There are also ascending/descending variations of each. 

There are existing settings that select which rules to use for sorting files, and which rules to use for directories.  (Note that TYPE only applies to files)

bahus:

--- Quote from: questions2000 on May 07, 2025, 09:08:54 PM ---If folders already sort this way, then why would filenames be different?

--- End quote ---

It's not different. Full filename consists of name and extension. And the difference you see is caused by extension part. If you name your folders similarly (for instance by adding .dir suffix for each name) you will see the same results:

Folder (2).dir
Folder (3).dir
Folder (10).dir
Folder.dir

Navigation

[0] Message Index

[#] Next page

Go to full version