Trailing "The" when naming Artist folders

Tags: #<Tag:0x00007f510ea41800> #<Tag:0x00007f510ea41738>

I’m finding this hard to search for, even though I’m positive it’s a common topic.
I’d like to use the default file naming script in Picard, except that I want to see “Beatles, The” rather than “The Beatles”. How can I accomplish this?

Two slightly different possibilities:

  1. Use the $swapprefix() function, e.g.:

    $swapprefix(%albumartist%)
    

    This will by default move “The” and “A” to the end, e.g. “Beatles, The”. If you want to have other prefixes, e.g. for other languages, you can specify your own, e.g.:

    $swapprefix(%albumartist%,The,A,Die)
    

    In addition to “The” and “A” it also considers the German “Die”, e.g. “Die Toten Hosen” gets “Toten Hosen, Die”. That might of course also hit some cases where a English band name starts with “Die” :wink:

  2. Use the sortname (%artistsort% or %albumartistsort%). For bands this usually gives the same result as above, but it will also switch person names from “first name last name” to “last name, first name”.

Choose whichever fits your needs better.

3 Likes

Awesome, thank you very much.
So would I insert that swapprefix function everywhere in the script that I see artist or albumartist variables?
nvm, I think I got it.

1 Like