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: Sorting by name ignore "The" (Read 5000 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Sorting by name ignore "The"

How would I go about telling the alphabetical sorting to ignore "The" at the beginning of names so a name like "The Boredoms" would sort with 'B' and not down at 'T'?

Sorting by name ignore "The"

Reply #1
Search for $stripprefix(X) etc in the file "titleformat_help.html" in your foobar2000 installation folder (or press F1 in foobar2000).
This is HA. Not the Jerry Springer Show.

Sorting by name ignore "The"

Reply #2
What version of foobar2000?
What interface, default or Columns?
Are you talking about within a library viewer?
Which one?
Etc. There is a sticky in this forum that offers advice to help you provide enough information in order to receive good help.

Or you could use the search box. Putting ignore "The" returns help to get you in the right direction

EDIT: or follow above advice

Sorting by name ignore "The"

Reply #3
Thanks for such a quick response.
Sorry about ignoring the sticky, I usually don't go to such lengths for my music player/library- I've just used windows media player up until today when I got my first FLAC album and needed a new player. Of course the one thing I worry most about, as it would happen, is when an alphabetizer honors "The".
Anyway, Robertina, you answer helped, thanks. But, as I'm still getting used to the interface, I'm trying to figure out how to apply the $stripprefix(X) code to the Album List node using the "Album List + Properties (tabbed)" layout. It doesn't use columns like the playlist and so I don't think I can just use a custom column, there's a pop-out menu at the bottom that lets you sort by various presets (album, artist, genre, etc.). I'm running v1.1.7.
I've searched now and don't think there's an answer yet for this particular problem? Maybe it's not possible to do this in the Album List pane?
Thanks for the help. (btw I didn't actually use windows media player because I thought it was good, please forgive me, Foobar is much better!)

Sorting by name ignore "The"

Reply #4
Open Preferences and navigate to Media Library -> Album List. On The Views box, select the view you normally use, click the  formatting string to edit it and enclose either %artist% or %album artist% in "$stripprefix()".

So,  for example, the entry "by artist/album" changes to from the default to "[$stripprefix(%album artist%) - ]['['%date%']' ]%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%". Notice the location of the the $stripprefix operator inside the brackets.

Sorting by name ignore "The"

Reply #5
Thanks, that does it.

Sorting by name ignore "The"

Reply #6
is there also a way to use $stripprefix() to ignore the prefix for the view "by folder structure". There is no entry in Preferences -> Media Library -> Album List for that view.

Sorting by name ignore "The"

Reply #7
Open Preferences and navigate to Media Library -> Album List. On The Views box, select the view you normally use, click the  formatting string to edit it and enclose either %artist% or %album artist% in "$stripprefix()".

So,  for example, the entry "by artist/album" changes to from the default to "[$stripprefix(%album artist%) - ]['['%date%']' ]%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%". Notice the location of the the $stripprefix operator inside the brackets.


Is there any way to use "$stripprefix()" but still have the prefix displayed? For example, The Hives is sorted under H, but still displayed as The Hives. I've been reading the Title Formatting help, but don't understand it well enough to tell if that's possible. Thanks.

Sorting by name ignore "The"

Reply #8
50% of your request is possible using $swapprefix, which would display "Hives, The". AFAIK different strings for display and sort are only possible in some (component-based) playlist UI elements/panels.

Sorting by name ignore "The"

Reply #9
@rocketsauce, Library tree is able to do what you want but it's only available as a columns UI panel. i'll just quote my post from another thread....

library tree has it's own special function called $nodisplay which means you can sort by removing "The" without actually affecting how it is displayed.

right click the top level element and select "edit view". start off the string something like....

Code: [Select]
$nodisplay($swapprefix(%artist%))%artist%\....




it can be downloaded here: http://foo2k.chottu.net/#lt


Sorting by name ignore "The"

Reply #11
If you are thinking of totally changing interface for this option, you might look into using Facets for your DUI library viewer. It will sort, ignoring the prefix, while showing the prefix.