Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Sort By %_length% (Read 3633 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Sort By %_length%

When i Sort by %_length%
can't get right result.

screenshot:

Sort By %_length%

Reply #1
It's behaving exactly like it's supposed to to me...

Use this instead:  $num(%_length_seconds%,6)

Sort By %_length%

Reply #2
19 is sorted before 2 because it starts with a 1 and 1 comes before 2.

In order to change this into what I think you expect, where 2 is displayed before 19, and tracks with hour values display after tracks without hour values try this (I tested it and it appears to work here):

- Navigate to File> Preferences> Display> Columns UI> Playlist View.
- Switch to the "Columns" tab. and select your length column from the "Columns" section on the left.
- About halfway down the page select the "Sort" tab.
- Enter this string in the big box:
Code: [Select]
$num(%length_seconds%,10)

- Now up and to the right check the box "
  • Use custom sort spec"
    - Click [Apply], [Save All], then [Close]

    Now when you click on your column header the playback times should be sorted as I think you expected.  If you are not using the column headers to sort and are instead using the "Sort incoming files by" under the general preferences.. simply change %_length% to %length_seconds%.

Sort By %_length%

Reply #3
i know.
thanks.

i expect next version will perfect.



Sort By %_length%

Reply #6
Sorting is done by comparing the strings that are displayed in your column. The sorting engine has really no idea how to interpret this text, so it cannot do anything better. If you want something else than default displayed-string compare, you have to provide sorting strings, as you were advised above.
Maciek

Sort By %_length%

Reply #7
I also think that sorting according to length should actually sort by length and not by the first number of the length.
The sorting engine is not an interpreter, it simply sorts by strings. This is transparent and user friendly. Knowing this you can decide to use the %length_seconds%

The problem appears very often: If software tries to think for the user, i.e. if assumptions and exceptions are implemented, users, which can already think, get confused. For example (iirc!) the explorer in xp does such to me unexpected "intelligent" sorting like:

bk200
bk945
bk995
bk2000

Sort By %_length%

Reply #8
I know perfectly how sorting is done, and that's precisely what I am criticising. It would be easy to bypass the normal sorting for some tags/properties (length, filesize, ...). That way there would'nt be the problems Squeller tells about.

For example, doing a numeric comparison instead of an alphanumeric comparison when comparing numbers.

Not the ultimate feature, but definitely appreciated when using it

Sort By %_length%

Reply #9
I know perfectly how sorting is done, and that's precisely what I am criticising. It would be easy to bypass the normal sorting for some tags/properties (length, filesize, ...). That way there would'nt be the problems Squeller tells about.

For example, doing a numeric comparison instead of an alphanumeric comparison when comparing numbers.
Values for columns are not provided by selecting a tag for each column but by providing a string. Yes, you could guess that "%_length%" is a number, but what about "%_length% " (with a space at the end)? How smart should the guessing module be? Or what if I have something like "$if2(%_length%,'n/a')"? There is no obvious association between column and tag in ColumnsUI.

For example (iirc!) the explorer in xp does such to me unexpected "intelligent" sorting
I think you can turn this off using TweakUI (Explorer->Use intuitive filename sorting).
Maciek

 
SimplePortal 1.0.0 RC1 © 2008-2021