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 artists with 'the' at beginning (Read 27918 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

sorting artists with 'the' at beginning

Reply #25
can this be done in the filter view as well?

sorting artists with 'the' at beginning

Reply #26
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.

sorting artists with 'the' at beginning

Reply #27
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.

Re: sorting artists with 'the' at beginning

Reply #28
Any ideas how it is possible to expand this:
Quote
$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?

Re: sorting artists with 'the' at beginning

Reply #29
Any ideas how it is possible to expand this:
Quote
$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 function:

Code: [Select]
$swapprefix(%album artist%,The,Die,Das)
I'm late

Re: sorting artists with 'the' at beginning

Reply #30
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"
 


Re: sorting artists with 'the' at beginning

Reply #32
Yes, I'm using Foobar also as Media Server.

Re: sorting artists with 'the' at beginning

Reply #33
As I recall you can edit '<foobar2000 directory>\foo_upnp_ml_tree.xml' to dictate what is shown in the (upnp) library tree.

Re: sorting artists with 'the' at beginning

Reply #34
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">%&lt;genre&gt;%</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 :(

 

Re: sorting artists with 'the' at beginning

Reply #35
Ever listened to Therion?


Lepaca \m/


Re: sorting artists with 'the' at beginning

Reply #37
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?