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 in Foobar playlist view [Columns UI = moved from General] (Read 29884 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Sort in Foobar playlist view [Columns UI = moved from General]

This may be old news by now but it gave me some trouble and I couldn't find the solution on this site.

I downloaded fb2k with columns ui and have been messing with the layouts and ripping CDs and I noticed
when you click on an album the tracks show up in the playlist in alphanumeric unless the tracknames are already numbered...

I tried Edit >Sort >Sort by 
and  putting %Tracknumber% in front and it would work until the next time you clicked on that album

So I went to Preferences > columns ui > Playlist view
and under the Columns tab I went to the Scripts tab in Column details and then to the  Sort tab by checking "use custom sort script"

and I entered  %ALBUM% - %DISCNUMBER% - %TRACKNUMBER% - %DATE% - %ALBUM ARTIST% - %TITLE%
but that didn't keep the sort permanent either.  Still, I left these changes in place anyway.

It wasn't until I right-clicked on the disordered album title and selected Properties
and in the Properties window I noticed the Track Number line showed its multiple entries in non-numeric order. 

***At the bottom of the Properties window on the left click the Tools button and select  "Auto track number" 
and that made the numeric track order of the album stable the next time I clicked on it. ***

Again this feature was probably developed in answer to that old thread and I just caught on but maybe it will save the next guy some searching...

Cheers,

Sort in Foobar playlist view [Columns UI = moved from General]

Reply #1
Why can’t you just set CUI to sort by track-number? Automatic numbering should only be needed if your tracks didn’t already have a track number, in which case, that’s an omission from your workflow.

Quote
and in the Properties window I noticed the Track Number line showed its multiple entries in non-numeric order.
This shouldn’t affect how they are sorted. Do you mean that they did not have leading 0s for numbers <10?

Sort in Foobar playlist view [Columns UI = moved from General]

Reply #2
... I noticed when you click on an album the tracks show up in the playlist in alphanumeric unless the tracknames are already numbered...

This is because the default sort in foobar is %path_sort%. The order of the files in the directory is the order foobar will use to display them. To have them display in the correct order with %path_sort% as the default sort, files' names should at least begin with the tracknumber when it's a single disc album and discnumber followed by tracknumber when it's a multi-disc album.

I tried Edit >Sort >Sort by 
and  putting %Tracknumber% in front and it would work until the next time you clicked on that album

Sorts defined there are temporary. foobar will revert to the default sort as you discovered.

So I went to Preferences > columns ui > Playlist view
and under the Columns tab I went to the Scripts tab in Column details and then to the  Sort tab by checking "use custom sort script"

and I entered  %ALBUM% - %DISCNUMBER% - %TRACKNUMBER% - %DATE% - %ALBUM ARTIST% - %TITLE%
but that didn't keep the sort permanent either.  Still, I left these changes in place anyway.

Custom sorts defined for Columns UI columns are also temporary and work only when clicking on the header for that column. Again, foobar will revert to its default sort.

It wasn't until I right-clicked on the disordered album title and selected Properties
and in the Properties window I noticed the Track Number line showed its multiple entries in non-numeric order.

Again, this is likely due to %path_sort% and your files' names.

***At the bottom of the Properties window on the left click the Tools button and select  "Auto track number" 
and that made the numeric track order of the album stable the next time I clicked on it. ***

As dba1989 pointed out, this shouldn't affect how files are sorted.


The default sort can be changed. It's settings are located at Preferences > Shell Integration > Sort incoming files by:. If
Code: [Select]
%ALBUM% - %DISCNUMBER% - %TRACKNUMBER% - %DATE% - %ALBUM ARTIST% - %TITLE%
is the default sort that you want, enter it in the box located there.

Sort in Foobar playlist view [Columns UI = moved from General]

Reply #3
Why can’t you just set CUI to sort by track-number? Automatic numbering should only be needed if your tracks didn’t already have a track number, in which case, that’s an omission from your workflow.


Ah! Do you mean Preferences>CUI> Filter Tab > Sort incoming files by:
Then enter the %...% string...
No, I had not tried that,  that was blank or set to %path...
I did try that same idea under shell integration but it didn't work

Yes. That's a better solution it works automatically for existing and newly ripped incoming albums. Unfortunately, I didn't find that described online until after my last post. Fb2k has lots of places to sort things...

Well, what can I say, just downloaded the thing yesterday, was happy to find my own work-around...
Thanks for clarifying.

Quote
and in the Properties window I noticed the Track Number line showed its multiple entries in non-numeric order. This shouldn’t affect how they are sorted. Do you mean that they did not have leading 0s for numbers <10?


I just meant on Track Number in the Properties window for the whole album it showed:
-multiple entries- 7;4;2;3;6;9;1;5;8    instead of the entries being in numeric order.
presumably they were in the same order as the track titles...

After I selected Auto Track number the entries were then in ascending numeric order on that line

Thanks,

Sort in Foobar playlist view [Columns UI = moved from General]

Reply #4
Yes. That's a better solution it works automatically for existing and newly ripped incoming albums. […] Thanks for clarifying.
Glad to hear you got it working!

Quote
[…] instead of the entries being in numeric order.
presumably they were in the same order as the track titles...

After I selected Auto Track number the entries were then in ascending numeric order on that line
It’s been a while since I used these functions, but wouldn’t that re-number your tracks into the wrong order compared to the real order from the album?

Sort in Foobar playlist view [Columns UI = moved from General]

Reply #5
i have a similar question:

i set foobar to sort incoming files by
%albumartistsort% - %date% - %album% - %discnumber% - %tracknumber% - %title%

recently i noticed, that foobar sorts my albums by "original release date", if such a tag exists in a file.
i really can't imagine why it is doing this! i want it to just sort by "date" and nothing else. still i need my "original release date"-tags in some cases, so i do not want to remove them.....

Sort in Foobar playlist view [Columns UI = moved from General]

Reply #6
recently i noticed, that foobar sorts my albums by "original release date", if such a tag exists in a file.
i really can't imagine why it is doing this!
Presumably, %date% acts like various other mappings by checking various actual fields, in order.

Quote
i want it to just sort by "date" and nothing else.
So bypass the mapping and access the desired field directly using $meta(). In this case: $meta(date).

Sort in Foobar playlist view [Columns UI = moved from General]

Reply #7
i always wondered, what "$meta()" is for...

so i tried sorting incoming files by
%albumartistsort% - $meta(date) - %album% - %discnumber% - %tracknumber% - %title%
but it did not work! my albums are still sortet by original release date.

Sort in Foobar playlist view [Columns UI = moved from General]

Reply #8
i tried sorting incoming files by
%albumartistsort% - $meta(date) - %album% - %discnumber% - %tracknumber% - %title%
but it did not work! my albums are still sortet by original release date.


Forgive me if I misunderstood your problem, but can't you find a way to delete the "original release date" tags and just leave the correct "date" ones you want to use? Maybe if you import your collection to foobar, select all the songs --> right click --> properties, find the "original release date" field --> right click --> remove, it will do.

Edit: Sorry, I just noticed you want to keep them...