Help - Search - Members - Calendar
Full Version: sort by track length bug
Hydrogenaudio Forums > Hosted Forums > foobar2000 > Support - (fb2k)
Naveb
im using .9b11 at the moment and when i sort my playlist by song length it gets the double digit song lengths mixed up.

for example

1:58
1:59
10:54
14:33
19:21 ...
... 2:59
21:23
24:31
3:11 etc.

so when a song goes into its teens it will be sorted after 1min 59sec and if its in the twentys it will be sorted after 2min 59sec, etc.

Probably not an important one as not many people sort out their songs by length but just though i tell you, unless its already been reported.
kjoonlee
Sort by song length in seconds. Pad the number of seconds.

$num(%_length_seconds%,9)
Insolent
Binary can be an arse at times, eh? wink.gif See, in binary 10 comes before 2. In older versions of Windows, that'd happen when sorting.

eg: Document10 would come before Document2.

Try padding the length with zeros:
CODE
$num(%length%,6)
foosion
QUOTE(Insolent @ Nov 19 2005, 03:12 PM)
Binary can be an arse at times, eh? wink.gif See, in binary 10 comes before 2. In older versions of Windows, that'd happen when sorting.
*

What does this have to do with "binary"? This is an issue of lexicographical order versus "natural" order.
Olive
You want to sort by length_seconds wink.gif
xhaos
QUOTE
in binary 10 comes before 2.


there isn't the token '2' in binary. If you intended the 2 to be taken as '10' in binary, well, it makes even less sense. 10 comes before 10?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.