Hi.. I am trying to find out how foobar can display artist who have 'the' at the beginning, e.g. The Smiths, to display at 'S' rather than 'T', like iTunes does.
I'm sure it's quite a simple fix... but I just cant seem to find out how to do it.... GRRR
Anyone have any ideas ...? (apart from having to change to 'Smiths, The)
Hi.. I am trying to find out how foobar can display artist who have 'the' at the beginning, e.g. The Smiths, to display at 'S' rather than 'T', like iTunes does.
I'm sure it's quite a simple fix... but I just cant seem to find out how to do it.... GRRR
Anyone have any ideas ...? (apart from having to change to 'Smiths, The)
I have made something like this:
I created a tag named: %THE% with the value "The". The tag I applied only for the artist with The, like THE Prodigy, THE Cranberries, etc...
In the tag field named %ARTIST% I deleted "The". So for "The Prodigy" I have only "Prodigy".
Than in the ARTIST column for ColumnUI I have this scripts codes:
For DISPLAY:
[%THE% ]%artist%
For SORT field:
%artist%%album%%DISCNUMBER%
Sorry my English, is not my native language
In your Artist column sort order, replace %artist% with -
$if($stricmp($left(%artist%,3),'The'),
$right(%artist%,$sub($len(%artist%),4))
,
[%artist%]
)
Thanks both of you, it worked!
Thanks both of you, it worked!
hmm i tried in on the group display in scpl and it didnt work
In your Artist column sort order, replace %artist% with -
$if($stricmp($left(%artist%,3),'The'),
$right(%artist%,$sub($len(%artist%),4))
,
[%artist%]
)
Ever listened to Therion?
$if($stricmp($left(%artist%,4),'The '),
$right(%artist%,$sub($len(%artist%),4))
,
[%artist%]
)
Thanks to all, I had been looking for a way to do this. However, is there a way to do it in the albumlist?
Ever listened to Therion?
$if($stricmp($left(%artist%,4),'The '),
$right(%artist%,$sub($len(%artist%),4))
,
[%artist%]
)
Shouldn't you then take the substring of %artist% starting at 5, instead of 4?
$if($stricmp($left(%artist%,4),'The '),
$right(%artist%,$sub($len(%artist%),5))
,
[%artist%]
)
Shouldn't you then take the substring of %artist% starting at 5, instead of 4?
$sub != substring. It's "subtract". This operator is used here for evaluating the number of symbols we take from the original string (starting from the right, hence the $right operator).
Thanks to all, I had been looking for a way to do this. However, is there a way to do it in the albumlist?
I think so.
Replace the %album artist% in the desired view strings with
$if($stricmp($left(%album artist%,4),'The '),$right(%album artist%,$sub($len(%artist%),4))', 'The,[%album artist%])
Shouldn't you then take the substring of %artist% starting at 5, instead of 4?
$sub != substring. It's "subtract". This operator is used here for evaluating the number of symbols we take from the original string (starting from the right, hence the $right operator).
Thanks to all, I had been looking for a way to do this. However, is there a way to do it in the albumlist?
I think so.
Replace the %album artist% in the desired view strings with
$if($stricmp($left(%album artist%,4),'The '),$right(%album artist%,$sub($len(%artist%),4))', 'The,[%album artist%])
Worked, thank you!
In your Artist column sort order, replace %artist% with -
$if($stricmp($left(%artist%,4),'The '),
$right(%artist%,$sub($len(%artist%),4))', The'
,
[%artist%]
)
Edited for betterness. :]
Because your previous code include anything that stated with "The" like These or Their or whatever.
$if($stricmp($left(%album artist%,4),'The '),
$right(%artist%,$sub($len(%album artist%),4))', The'
,
[%album artist%]
)
Also for sorting you'd want to use album artist, because that defaults to %artist% if there's no actualy %album artist%
I actually can't get this code to work. I wonder if someone can help?
I've input the following into the 'Sort' tab section of my 'Artist Name' column:
$if($stricmp($left(%artist%,4),'The '),
$right(%artist%,$sub($len(%artist%),4))', The'
,
[%artist%]
)
... and I've made sure the 'Use custom sort spec' checkbox is ticked for that one column only.
The 'Meta field to edit' value of the column is 'ARTIST', and the 'Display' tab looks like this:
$if($strcmp(%albumartist%,'Various Artists'),
'Various -' [%album%]
,
[%albumartist%]
)
Clicking Apply and/or Save All does nothing.
The custom 'Sort by ...' code I am using from the edit menu looks like this:
%ALBUMARTIST% - %DATE% - %ALBUM% - %DISCNUMBER% - %TRACKNUMBER% - %TITLE%
Many thanks.
$if($stricmp($left(%artist%,4),'The '),$right(%artist%,$sub($len(%artist%),4))', The'
Why not $swapprefix(%artist%) ?
I actually can't get this code to work. I wonder if someone can help?
Things have been added to make this easier since two years ago.
I actually can't get this code to work. I wonder if someone can help?
Things have been added to make this easier since two years ago.
Ah. Would you mind pointing me in the right direction?
No need to repeat what lvqcl already said.
I was just explaining why the earlier posters in this thread didn't use the very-simple-to-use $swapprefix() function.
maybe I'm stupid or yea accentually stupid.
I want to sort without THE in this column.
(http://img26.imageshack.us/img26/3739/foo.jpg)
plz help I'm going nuts
Click Me (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Titleformat_Reference#.24stripprefix.28x.29)
I had the same need, but I also wanted to have surnames in front of first names for sorting, e.g. "Dylan, Bob" instead of "Bob Dylan". My only solution so far is to use a ARTIST SORTNAME meta field (like proposed by musicbrainz, if I remember correctly). For "The" bands I can fill ARTIST SORTNAME easily with the swapprefix command.
Click Me (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Titleformat_Reference#.24stripprefix.28x.29)
The problem for me, I have no idea were to put the $swapprefix(%artist%) I just began using foobar still finding my way around
[main menu]->Edit->sort->sort by
or
[Preferences]->Display->Default User interface->Playlist View->Columns, then add the column to your view, then click that column's header to sort by it.
I had the same need, but I also wanted to have surnames in front of first names for sorting, e.g. "Dylan, Bob" instead of "Bob Dylan". My only solution so far is to use a ARTIST SORTNAME meta field (like proposed by musicbrainz, if I remember correctly). For "The" bands I can fill ARTIST SORTNAME easily with the swapprefix command.
That's impossible to achieve automatically, since FB2K doesn't see name and surname, but a series of words. It would be very simple if all your artists have one word for name and one word for surname, but that's not the totality of the possibilities.
But since this is the majority, you could set a script for this type of artists to fill ARTIST SORTNAME, and then manually fill the field for the remaining ones.
Here's a script I came up with; I don't know its usability outside of Columns UI filter panels, which is where I'm using it, but all the same:
$if($stricmp($left(%band%,4),'The '),$right(%band%,$sub($len(%band%),4))', The',[%band%])
It takes the first four characters, looking for "The" followed by a single space to avoid messing up bands whose first word begins with "The", and if found, it renders %BAND% (replace with the field of your choice) with a trailing ", The". For example, "The Birthday Massacre" would become "Birthday Massacre, The". Seems to be working pretty well, and I haven't noticed any adverse effects so far.
No way I can find to display one thing and sort by another using a single script.
By the way if you're using an up to date version you can just use %swapprefix(%artist%) or $swapprefix(%artist%,The) if you want to just swap 'The ' and not 'A '.
One way to have independent sort and display is to use facets (for default UI only), where you can create a second column with your sort script and shrink it down so you can't see it. Another way is to use the library tree component and its $nodisplay() function. If you want to use filters you can do something with the colour codes, you can make the text you want to sort by invisible, although it will still have the same width- but you can probably take the first 3 or 4 characters of that without effecting your sorting.
By the way if you're using an up to date version you can just use %swapprefix(%artist%) or $swapprefix(%artist%,The) if you want to just swap 'The ' and not 'A '.
One way to have independent sort and display is to use facets (for default UI only), where you can create a second column with your sort script and shrink it down so you can't see it. Another way is to use the library tree component and its $nodisplay() function. If you want to use filters you can do something with the colour codes, you can make the text you want to sort by invisible, although it will still have the same width- but you can probably take the first 3 or 4 characters of that without effecting your sorting.
Yes, I'm aware of the $swapprefix function, but I thought I would post the full script for those that may not be able to use the "easy" way, since I saw somewhere in the thread "I was just explaining why the earlier posters in this thread didn't use the very-simple-to-use $swapprefix() function" and assumed it wasn't an option.
can this be done in the filter view as well?
I had the same need, but I also wanted to have surnames in front of first names for sorting, e.g. "Dylan, Bob" instead of "Bob Dylan". My only solution so far is to use a ARTIST SORTNAME meta field (like proposed by musicbrainz, if I remember correctly). For "The" bands I can fill ARTIST SORTNAME easily with the swapprefix command.
That's impossible to achieve automatically, since FB2K doesn't see name and surname, but a series of words. It would be very simple if all your artists have one word for name and one word for surname, but that's not the totality of the possibilities.
But since this is the majority, you could set a script for this type of artists to fill ARTIST SORTNAME, and then manually fill the field for the remaining ones.
I'm new at this, but I believe you could also select all your tracks, go to Properties, select %artist% and right-click to Edit, CTRL-A to select all, and paste into Excel. This will create a one column display of all your artists. Then you can use Excel functions to create your LAST, FIRST protocol and when this is done for all artists and in one column, copy the column. Back in foobar, go back to Properties, add a field called ARTIST SORTNAME or whatever, right-click it and choose Automatically Fill Values. Select "Clipboard: Line Per Track" from "Source" and type in %ARTIST SORTNAME% in Pattern. As long as your selection for Properties is exactly the same as it was when you copied out the %artist% field, everything should match up. If something goes wrong, you could just remove or clear the field and try again.
I might give this a shot.
can this be done in the filter view as well?
That's the same reason I found this post. Anyone? The playlist view in columns UI already organizes things fine, but anything that starts with "The" gets sorted into the T's in filter view, which seems like a huge oversight. I can't see a way to modify how the filters sort, I just started trying out foobar2000 today.
Any ideas how it is possible to expand this:
$if($stricmp($left(%album artist%,4),'The '),
$right(%artist%,$sub($len(%album artist%),4))', The'
,
[%album artist%]
)
so that "Die" or "Das", for german bands, also moved to the end of the name?
Any ideas how it is possible to expand this:
$if($stricmp($left(%album artist%,4),'The '),
$right(%artist%,$sub($len(%album artist%),4))', The'
,
[%album artist%]
)
so that "Die" or "Das", for german bands, also moved to the end of the name?
Use the $swapprefix (http://wiki.hydrogenaud.io/index.php?title=Foobar2000:Title_Formatting_Reference#.24swapprefix.28x.2Cprefix1.2Cprefix2.2C....29) function:
$swapprefix(%album artist%,The,Die,Das)
Works nicely. Thank you very much!
I also would like see this sorting over UPnP. ;) Do you know how the Media Libery Tree must be edited for this?
"The" and "A" is no problem, because Foobar already has a swap option for this in artist names under the UPnP/Server/Contents section. But of course there is nothing for "Die" or "Das"
I also would like see this sorting over UPnP. ;)
I don't know what you mean. Are you talking about the foo_upnp component?
Yes, I'm using Foobar also as Media Server.
As I recall you can edit '<foobar2000 directory>\foo_upnp_ml_tree.xml' to dictate what is shown in the (upnp) library tree.
I'm not familiar with the structure of the libary tree xml. The question is were and how to add the right lines.
I'm so disangeged to post my libary tree here ;) I hope someone could help me:
<MediaLibraryTree>
<SubTree label="Albums">
<spec type="object.container.album.musicAlbum">%album%[ '['%album artist%']']</spec>
</SubTree>
<SubTree label="Artists">
<spec type="object.container.person.musicArtist">%artist%</spec>
<spec type="object.container.album.musicAlbum">%album%</spec>
</SubTree>
<SubTree label="Album Artists">
<spec type="object.container.album.musicAlbum">[%album artist% - ]['['%date%']' ]%album%</spec>
</SubTree>
<SubTree label="Genres">
<spec type="object.container.genre.musicGenre">%<genre>%</spec>
<spec type="object.container.album.musicAlbum">[%album artist% - ]%album%</spec>
</SubTree>
<SubTree label="Years">
<spec>%date%</spec>
<spec type="object.container.album.musicAlbum">[%album artist% - ]%album%</spec>
</SubTree>
<SubTree label="Compilations" query="compilation PRESENT">
<spec type="object.container.album.musicAlbum">[%album artist% - ]%album%</spec>
</SubTree>
<SubTree label="Codecs">
<spec>%codec%</spec>
<spec type="object.container.album.musicAlbum">[%album artist% - ]%album%</spec>
</SubTree>
<SubTree label="Folders" type="filesystem"/>
</SubTree>
<SubTree label="Label">
<spec>%publisher%</spec>
<spec type="object.container.person.musicArtist">%artist%</spec>
<spec type="object.container.album.musicAlbum">%album%</spec>
</MediaLibraryTree>
I also tried before to add the "Label" entry, but it isn't working :(
Ever listened to Therion?
Lepaca \m/
I also tried before to add the "Label" entry, but it isn't working :(
Looks like you didn't close it with
</SubTree> at the end.
Thanks, marc2003!
I closed it with that line and I also changed %publisher% to %<publisher>%. But this whole entry still won't appear at my Pioneer. :(
Any ideas how I could use this swapperprefix line from davideleo here too?