Music Banter - View Single Post - Foobar2000 - Support and Discussions
View Single Post
Old 03-26-2010, 01:24 AM   #71 (permalink)
Guybrush
Juicious Maximus III
 
Guybrush's Avatar
 
Join Date: Nov 2008
Location: Scabb Island
Posts: 6,525
Default

Quote:
Originally Posted by Zero1986 View Post
Cheers. Yeah it pretty much worked for me, only i used $swapprefix(%artist%,The) cos i don't really mind the 'A' prefixes. I can't seem to find a way to sort it like that but still display the artist as 'The Artist'. Facets gives you this option but Filter in columns UI doesn't. I know it's only a small thing but it still bugs me haha.
The solution is simple here. If you have a code for view format, just show %<artist>% or $meta(artist,0) or something there, not $swapprefix(%<artist>%).

Just use $swapprefix() code in the sorting code.

Here's an example from my library tree config. I've marked the %<artist>% code used to show my music in the field named "view format". Below, in the sort field, you can see $swapprefix(%album artist%).



This makes "The Prodigy" appear just like I wrote it, but sorts it as if it was "Prodigy, The". If you don't have a separate view/sorting code in your setup, well .. You should!

%<artist>% outputs any artist in the artist field. If the song "Islands in the Stream" has multiple artists in the artists field, say "Dolly Parton; Kenny Rogers", the song will be listed under both.

$meta(artist,0) would only output the first value, Dolly Parton. You can use these features to tag music for example belonging to several genres at once.
__________________
Something Completely Different
Guybrush is offline   Reply With Quote