Foobar2000 - Support and Discussions - Music Banter Music Banter

Go Back   Music Banter > Community Center > The Lounge
Register Blogging Today's Posts
Welcome to Music Banter Forum! Make sure to register - it's free and very quick! You have to register before you can post and participate in our discussions with over 70,000 other registered members. After you create your free account, you will be able to customize many options, you will have the full access to over 1,100,000 posts.

Reply
 
Thread Tools Display Modes
Old 03-26-2010, 01:24 AM   #71 (permalink)
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
Old 03-26-2010, 02:13 AM   #72 (permalink)
thirsty ears
 
noise's Avatar
 
Join Date: Sep 2009
Location: Boulder
Posts: 742
Default

that works for Library Tree, and you can do something similar in most Playlist views, but unfortunately it is not possible in Filters, because there is no seperate sort code.

answer i got from the official forums:

Quote:
Filters always sorts by what it displays. As a workaround, you can insert the letter you want to sort by at the beginning and set it to have the same foreground and background color to hide it.
__________________
my flac collection
noise is offline   Reply With Quote
Old 03-26-2010, 06:11 AM   #73 (permalink)
Juicious Maximus III
 
Guybrush's Avatar
 
Join Date: Nov 2008
Location: Scabb Island
Posts: 6,525
Default

I might be misunderstanding what filters we're talking about, but at least the ColumnsUI filters have a sorting script option.



I've marked some code to show where you find the option in the picture. As you can see, artist just shows %artist%, but checking the option to sort incoming files should sort it as if by $swapprefix()

Note that I don't use these filters myself much, though!
__________________
Something Completely Different
Guybrush is offline   Reply With Quote
Old 03-26-2010, 08:41 AM   #74 (permalink)
thirsty ears
 
noise's Avatar
 
Join Date: Sep 2009
Location: Boulder
Posts: 742
Default

that sorts the files as they are added to the playlist from the filter panel, but it does not change the way they are displayed in the filer panel itself
__________________
my flac collection
noise is offline   Reply With Quote
Old 03-26-2010, 08:50 AM   #75 (permalink)
Juicious Maximus III
 
Guybrush's Avatar
 
Join Date: Nov 2008
Location: Scabb Island
Posts: 6,525
Default

Quote:
Originally Posted by noise View Post
that sorts the files as they are added to the playlist from the filter panel, but it does not change the way they are displayed in the filer panel itself
Isn't that just the thing? He wants artists displayed as they are, but wants them sorted as by $swapprefix() ..

Quote:
Originally Posted by zero
I can't seem to find a way to sort it like that but still display the artist as 'The Artist'.
My examples above do that, so unless I'm mistaken, it should be just the thing he's looking for?

Here's my own filters :



The Prodigy are sorted under P due to $swapprefix(), but still show up as "The Prodigy" in the filter.
__________________
Something Completely Different
Guybrush is offline   Reply With Quote
Old 03-26-2010, 10:19 AM   #76 (permalink)
thirsty ears
 
noise's Avatar
 
Join Date: Sep 2009
Location: Boulder
Posts: 742
Default

woah something is amiss

that Sort field has nothing to do with how the entry is displayed in a Filter. it only comes into effect when you click an item in the Filter - then it gets sorted on its way to the playlist.

yet the Filter in your screenshot is doing what the OP is asking for.

could you past the code for that artist filter here? i want to take a look at it
__________________
my flac collection
noise is offline   Reply With Quote
Old 03-26-2010, 10:30 AM   #77 (permalink)
Juicious Maximus III
 
Guybrush's Avatar
 
Join Date: Nov 2008
Location: Scabb Island
Posts: 6,525
Default

Quote:
Originally Posted by noise View Post
could you past the code for that artist filter here? i want to take a look at it
There is no code aside from the sort script really. If you look at the screenshot up there, the filter that shows artist only has "artist" in it

I'll change it to %<artist>% now, though. That's what I'd like it to be.

edit :

My sorting script looks like this : $swapprefix(%artist%) $if(%release year%,%release year%,%date%) %album% $if(%disc number%,$left(%disc number%,2),) %tracknumber% %title%

%release year% is a tag I've made which is used when present instead of date. The reason is if I have a "best of the 80s" album released in 2009, I'd set the %release date% to 2009 and hope to tag each song with the original date which is sometime in the 80s. The reason I'm using the left 2 disc numbers is that I sometimes write disc numbers like this "2 - Bonus Disc" (or have in the past anyways), so that's to make sure I only fetch numbers.


more edit :

My Library Tree sorting script looks like this : $swapprefix(%album artist%) $if(%debut%,0,1) $if(%release year%,%release year%,%date%) %album% $if(%disc number%,$left(%disc number%,2),) %tracknumber% %title%

It's much the same except it makes doubly sure anything tagged as debut comes first. This is to sort out conflicts where an artist has a second release the same year as the debut.


edit yet again :

Ugh, I see filters won't accept "%<artist>%" .. That's losing a really neat functionality there!
__________________
Something Completely Different
Guybrush is offline   Reply With Quote
Old 03-26-2010, 10:47 AM   #78 (permalink)
thirsty ears
 
noise's Avatar
 
Join Date: Sep 2009
Location: Boulder
Posts: 742
Default

there's something seriously mysterious going on here.

i cannot reproduce the sorting displayed in your screenshot no matter what i do. changing the sort only changes how the files are added to the playlist.

officially, what you have displayed there is not possible using Filters.
__________________
my flac collection
noise is offline   Reply With Quote
Old 03-26-2010, 10:55 AM   #79 (permalink)
Juicious Maximus III
 
Guybrush's Avatar
 
Join Date: Nov 2008
Location: Scabb Island
Posts: 6,525
Default

Ohh right, I think I might know what's going on ..

If you check my settings, I've checked off for "By field list above". What that does is it makes artist first sort by the filters above it in the list. Checking this off creates a mess where "The Prodigy" gets back under the letter T. Just remember to move your filters up and down in the list so that they're right in the right position, something similar to what I've done in the screenshot.

I'm proud I've stumbled over something I take it people must've struggled with for a while though.

The code for artist and genre is just artist and genre respectively, but the other two are :
  • Artist Index : $left($swapprefix($replace(%album artist%,:,!,.,!,0,#,1,#,2,#,3,#,4,#,5,#,6,#,7,#,8, #,9,#)),1)
  • Album : $if(%release year%,%release year%,$left(%date%,4)) - %album%

The artist index code lists the first letter unless it's a number. Then it gets sorted under #. Punctuations go under ! although I add those to the code as they appear in my library so there aren't too many specified cases there.
__________________
Something Completely Different
Guybrush is offline   Reply With Quote
Old 03-26-2010, 11:58 AM   #80 (permalink)
thirsty ears
 
noise's Avatar
 
Join Date: Sep 2009
Location: Boulder
Posts: 742
Default

bingo!

if you choose P, you get The Prodigy, but alphabetically, it's still filed under 'T'

so it's not really a solution after all

EDIT

"By field list above" refers to the physical position of a Filter in your config. it only changes how things are displayed if you have multiple filters...
__________________
my flac collection
noise is offline   Reply With Quote
Reply


Similar Threads



© 2003-2024 Advameg, Inc.