Help - Search - Members - Calendar
Full Version: Incorrect sorting of numbers
Hydrogenaudio Forums > Hosted Forums > foobar2000 > Support - (fb2k)
imzjustplayin
Ok well its hard to know if its the playback statistics' fault or with foobar but I'll describe it anyways.

Playback statistics basically counts how many times you play a song, well if you've got songs that have been played twice or 20 times, when you try to sort the songs by how often they've been played. Instead of the songs that have been played 20 times being at the top or bottom of the list, it is inline with the songs that have been played twice. I believe the issue is with the fact that it sorts the songs only by the first number prefix and doesn't account for the 0 making it twenty instead of 2.

So the songs that have been played 10-19 times are considered played more than the songs that have been played once but are also less than the songs that have been played twice or 20 times... Now that I think about it, I believe foobar or the playbackstatistics is treating the second number as a decimal.
Frank Bicking
This is not a bug.

When you sort playlist items by a certain titleformat expression like %play_count%, the items are sorted as strings, and not numbers.

You can fix this by using $num(%play_count%,9) to insert leading zeros in front of the numbers.
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.