Sorting without the "THE" prefix in front of Artists in the Foobar Playlist
Jun 6, 2010 at 8:13 PM Thread Starter Post #1 of 16

donunus

Headphoneus Supremus
Joined
Nov 12, 2004
Posts
9,238
Likes
157
If I wanted to put this code in the Media Library - Album List configuration in the by artist/album column can someone refine this just to get rid of displaying "THE" as a prefix




[$if($stricmp($left(%artist%,4),'The '),
$right(%artist%,$sub($len(%artist%),4))
,
[%artist%]
)
- ]['['%date%']' ]%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%
 
Jun 6, 2010 at 8:48 PM Post #2 of 16
Or better yet How do i keep the sorting exactly like it is on that code and still show all the "THE" in the prefixes but when you press the letter T to go directly to an artist starting with that letter to ignore all the artists starting with "THE"
 
Basically I want the playlist to behave exactly like it does in itunes
 
Jun 6, 2010 at 9:53 PM Post #5 of 16
Preference > Media Library > Facets.
You may have to download the facets component as it is not included in the default package.
http://foobar2000.audiohq.de/foo_facets/
 
Jun 6, 2010 at 10:04 PM Post #7 of 16
Just configured that way... but now how do I use facets instead of the default album list? It doesn't display facets under media library
 
Jun 7, 2010 at 1:18 AM Post #10 of 16
I did not figure out how to get rid of the "the" in the playlists tabs, it just does not appear in the library viewer (facets_ui in this case which give foobar an itunes like interface), which should satisfy the need to find an artist quickly in most cases.
But if you managed to get rid of the "the" in the playlist area, I'd like to know how.
 
Jun 7, 2010 at 4:34 AM Post #11 of 16
I just ended up not using facets. This is all I did. 
 
 
BY ALBUM/ARTIST in Media Library Album List
 
[$if($stricmp($left(%artist%,4),'The '),
$right(%artist%,$sub($len(%artist%),4))
,
[%artist%]
)
 - ]['['%date%']' ]%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%
 
That is for the sorting part so that order ignores the "THE"
 
Then go to the Display, columns UI, playlist view then change whats written in the Display in the Artist column to this...
 
$if($stricmp($left(%artist%,4),'The '),
$right(%artist%,$sub($len(%artist%),4))', The'
,
[%artist%]
)
 
DONE!
 
I'm using columns UI and the ngplaylist BTW
 
Jun 7, 2010 at 4:41 AM Post #12 of 16
Do you have newer foobar, newer than 1.0 I meant? I don't know if it's added before 1.0 but I'm pretty sure you can remove "The" and "A" from any metadata field with $stripprefix(X), with x is the metadata field. You can read more about this title formatting function and similar functions in foobar html help file included with the installation.
 
Jun 7, 2010 at 4:44 AM Post #13 of 16
Ok, so what would you replace in my settings exactly? Can you post the exact codes to replace the ones i have? I would like to try that
 
Jun 7, 2010 at 4:55 AM Post #14 of 16
Simply replace your code
Code:
 $if($stricmp($left(%artist%,4),'The '), $right(%artist%,$sub($len(%artist%),4))', The' , [%artist%] )
with
Code:
 $swapprefix(%artist%)
 

Users who are viewing this thread

Back
Top