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: Columns UI: Sorting issue (alphanumeric) w/ "Sort by" and co (Read 3828 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Columns UI: Sorting issue (alphanumeric) w/ "Sort by" and co

hi all,
after searching for an hour i've read/learned a lot about sorting and the possibilities foobar2000 offers.
unfortunately, i did not find the clue to my simple problem: Sorting album names as i'd like to have them sorted via click in the album column (columnsUI used)

My playlist looks like:
(*after* i click the album-column to sort that column)
Album-column:
Code: [Select]
An Album (Volume 1)
An Album (Volume 10)
An Album (Volume 12)
An Album (Volume 2)
An Album (Volume 21)
An Album (Volume 3)

and should look like:
Code: [Select]
An Album (Volume 1)
An Album (Volume 2)
An Album (Volume 3)
An Album (Volume 10)
An Album (Volume 12)
An Album (Volume 21)


If i right-click and use the "Sort by" feature, it sorts correctamente.

the Standard Sort Patterns in my settings for this are: Album=%album%|%discnumber%|%tracknumber%; but the files to sort don't have any tag beside the album-tag.

So i tried to just add %album% to the ColumnsUI-Sort-Page of the album-panel (edit this panel-right-click-menu) and activated that option, but that didnt change anything ;-(

i tried some other silly things with the same result.

i did not find any sorting reference in the Title Formatting Syntax Reference beside %path_sort%, but thats not what i wanted to sort to.

can please anybody point me to a light in the darkness of my brain?



Columns UI: Sorting issue (alphanumeric) w/ "Sort by" and co

Reply #1
If An Album (Volume 1) is the content of your %album% tag, then that's a string, not a number, therefore the only option that comes to mind is changing the album name to something like An Album (Volume 01). Maybe an additional space instead of a zero would work as well.

HTH.

Alessandro

Columns UI: Sorting issue (alphanumeric) w/ "Sort by" and co

Reply #2
If An Album (Volume 1) is the content of your %album% tag, then that's a string, not a number, therefore the only option that comes to mind is changing the album name to something like An Album (Volume 01). Maybe an additional space instead of a zero would work as well.

Hi Alessandro,
thanks, but those files are from a read-only-media (DVD). No changing of tags possible.

There is not a way in foobar to sort a string? I'm deeply surprised...

How does the sorting of Titles work? They must be sorted in a similar way than albums.


Columns UI: Sorting issue (alphanumeric) w/ "Sort by" and co

Reply #3
He did not say there is no way to sort a string. Of course, foobar sorts strings. That is the manner in which numbers [represented NOT as a number, BUT a STRING] are sorted.
Take a quick look at the 11 million google hits with "sorting numbers in strings'.

Columns UI: Sorting issue (alphanumeric) w/ "Sort by" and co

Reply #4
those files are from a read-only-media (DVD). No changing of tags possible.
Then perhaps try setting a variable with:
$replace(%album%,'(Volume 1)','(Volume 01)')
$replace(%album%,'(Volume 2)','(Volume 02)')
etc.

Quite ugly plus I'm no title formatting expert (hope someone else will be able to help with the correct syntax ) but I see no alternatives, sorry.

HTH.

Alessandro

Edit:
Oh wait... what does this mean exactly? 
Quote
If i right-click and use the "Sort by" feature, it sorts correctamente.

Columns UI: Sorting issue (alphanumeric) w/ "Sort by" and co

Reply #5
what does this mean exactly? :o
Quote
If i right-click and use the "Sort by" feature, it sorts correctamente.


it means if i rightclick and use the "Sort by" feature, foobar will sort exactly the way, i want it.

unfortunately, foobar does not sort exact the same way while using the click on the "album" column. (there is no sort-script active in that column, so it must be the standard-sorting)

now, i'd like to set the sorting of the album column exactly as the sorting used by the "sort by" function (as described in my first posting (Standard Sort Patterns))

but i don't know how, because i did not find any "usable" function in the title formatting help, nor here at the forum, nor with using google.

now, that i received a new information "sorting numbers in strings" i feed the forums search engine with that...



Columns UI: Sorting issue (alphanumeric) w/ "Sort by" and co

Reply #6
it means if i rightclick and use the "Sort by" feature, foobar will sort exactly the way, i want it.
So if you select Right Click -> Sort By -> %album%|%discnumber%|%tracknumber% you get the expected sort order? And you are absolutely sure the %discnumber% tag is missing? If this is the case, I'm afraid I cannot explain what's going on...

Alessandro

 

Columns UI: Sorting issue (alphanumeric) w/ "Sort by" and co

Reply #7
So if you select Right Click -> Sort By -> %album%|%discnumber%|%tracknumber% you get the expected sort order?
yes.
And you are absolutely sure the %discnumber% tag is missing?
yes. the album-tag is the only tag inside those mp3-files.


thank you Alessandro for your help! atm i'm reading this and that topic and try to understand ;-)
if i get a result which will do what i want/need, i post it here. thanks also to the poster with the "sorting numbers in strings" searchterm which i was unaware of...