Hello!
I’m running into a bit of a snag, and it’s a little irritating to me; I’m hoping you experts might be able to help.
I’m currently using this script to rename and organize my files:
$replace($rreplace(
$if($eq(%albumartist%,Various Artists),[Various Artists],
$left($if2(%albumartistsort%,%artistsort%),1)
/
$left($rreplace($if2(%albumartistsort%,%artistsort%),; [^)]+,), 60))
/
$if(%date%,[$left(%date%,4)] )$left($replace(%album%,/,), 70)
$if($gt(%totaldiscs%,1),$if(%discnumber%, (Disc %discnumber%),),)
/
$left(%title%,120),[:?"_]+,), , )
It works like a charm…sort of. Bands like Ayreon and Aghast View are in folders “Ayreon” and “Aghast View”, while “The Beatles” are in “Beatles, The”. However, artists like Bryan Adams are being kicked over to “Adams, Bryan”. I’m sure it’s something simple I’m overlooking, any help is appreciated!
EDIT
Turns out, I just had to add a pair of $set tags to correct this:
$set(artistsort,$swapprefix(%artist%))
$set(albumartistsort,$swapprefix(%albumartist%))
Huge thanks to outsidecontext for the help!