How to move the word "The" to after the artist?


#1

I searched, I couldnt find a simple solution to move the word “The” after the artist. i.e. The Beatles becomes, Beatles, The.
Its all I want to do, its something probably along the lines of:
$replace($if($eq($left(%albumartist%,4),The )

but that doesnt work :frowning:
a Pre-Thank you for the help!


How can I file my songs separately into their own folders alphabetically? ignoring prefix's?
#2

I may of figured it out? its:
$left($if2(%albumartistsort%, %artistsort%),30)

I think thats working!


#3

Note: if you use artistsort on your entire collection, the changes won’t be limited to moving the ‘the’. You’ll also get e.g. “{family name}, {given name}” (which might not be something you want). More at Style/Artist/Sort Name.


#4

If all you want is handling The and A, but you don’t want to use the sort name in other cases, you can also use the $swapprefix function.

$swapprefix(%artist%)


#5

ty so much caller and outside!! Ya I def do not want to do artistsort now for my collection. Glad u told me ty caller6!

And thats perfectly what I wanted too outside, just a simple syntax to move the and a after the artist. thanks again!


#6

Just for completeness, you can define your own set of prefixes. The default is A and The, but if you also want to move e.g. the German “Die” (the equivalent to English The) as in “Die Toten Hosen” you can do that also:

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

#7

Hello, Hope no one minds if i ask a similar question in this thread? I have the same problem as the OP. I put the “$swapprefix(%artist%,A,The,Die)” that outsidercontext replied with but it didn’t work so i tried without “Die” same result and then without “The and A” same result again. Does it need to go in a particular place in the renaming string i’m using? This is what i’m currently using
$if2(%albumartist%,%artist%)/$if($ne(%album%,),%album% /)$if($gt(%totaldiscs%,1),%discnumber%-,)$if($ne(%tracknumber%,),$num(%tracknumber%,2) %title%,%title%)$if($ne(%musicbrainz_artistid%,%musicbrainz_albumartistid%), [%artist%],)

Thanks


#8

It needs to go where ever in that renaming string you want it :wink:

E.g. your script currently creates a folder for the artist:

$if2(%albumartist%,%artist%)

If you want to swap the prefix there you have to use the $swapprefix function exactly there, e.g.

$swapprefix($if2(%albumartist%,%artist%))

#9

That worked a treat, thanks, :smile: