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: Issue with foobar2000 playlist sorting (Read 2507 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Issue with foobar2000 playlist sorting

Hello, I assume I am in right place to submit an issue with foobar2000 playlist sorting. The problem is playlist elements with brackets in the end in name is displayed before the same names but without brackets. AFAIK according to lexicographical sorting it should be vice-versa. It this bug or feature? The issue is reproducible in clean foobar2000 install without any playlist grouping using %path_sort% setting to incoming files. Thanks.

On the screenshot below on playlist grouped by directory "Nighttime Birds" is located after "Nighttime Birds (Limited Dexule Edition - CD2)"
Foobar 1.3.2 - windows 7 64bit Russian with Belorussian locale, but I don't think locale is the cause, explorer and totalcmd sort files in the right order.
       

Issue with foobar2000 playlist sorting

Reply #1
If you look at the Album List, you should see that the directories get sorted just fine. You can try to sort your playlist by %directory% in which case the relative order of the two directories should be what you expect. Of course the order of the playlist as a whole may not be what you want. When you sort the playlist by %path_sort% however you also have to look at the directory separators. Here is a small example using the directory names from your post and some made-up file names:
Code: [Select]
Nighttime Birds\song1.mp3
Nighttime Birds (Limited Deluxe Edition - CD2)\song2.mp3
In this case the lexicographic ordering compares "\" to " " to decide the relative order of the two tracks.

OCD much?
There is no reason to mock people who just want CD 1 to get sorted before CD 2.

Issue with foobar2000 playlist sorting

Reply #2
Thank you a lot! This expression solved my issue completely.
Code: [Select]
$directory_path(%path%)

Issue with foobar2000 playlist sorting

Reply #3
The final variant
Code: [Select]
$pad($directory_path(%path%),255)%filename%%subsong%

Issue with foobar2000 playlist sorting

Reply #4
What about populating the DISCNUMBER/TOTALDISCS tag fields to be 1/2 and 2/2, then sort by Artist/Album/Year/Disc #/Track #? I mean, you don't *have* to do it that way, but in that scenario it doesn't matter if you rename the folders or have, say, another two folders that are just the opposite naming convention/order as your example here? In that case, it's dependent on the path/filename to be uniform throughout the entire library, and if you did, perchance, have two other folders that were inverted in their naming convention... then you'd always have 1 of the 2 instances out of order, no matter what. Again, just my opinion, but using ID3 tag data eliminates variability like that and you always get it sorted correctly as long as you have your tags done properly...

Or wouldn't it make more sense to name the folders and/or the album field as:
Nighttime Birds (Limited Deluxe Edition - CD1)
Nighttime Birds (Limited Deluxe Edition - CD2)

Otherwise, it looks like you are missing CD1 of the Deluxe Edition (but it says right there it's Disc 1)... I'm just thinking if you're gonna go for uniformity and clean naming/sorting... the naming in the first place seems kind of illogical... BUT they're not my folders and files, I am just sort of thinking of the more efficient and more uniform way to do things, cause I'm OCD as hell about my stuff, so I can't say anything. Just recommending alternative/improved solutions. There's more than one way to skin a foobar...

Issue with foobar2000 playlist sorting

Reply #5
Thanks! but...
1) Not All tags are present correctly.
2) Why are you  so sure I have write access to the collection source? )) е.g. burned 50gb BD-R with flac music.