Default Naming Script - Help

I’m trying to modify the default script (since I’m new to this I’m trying to avoid creating my own and messing things up). I don’t understand the second line, specifically why that entire line isn’t simply replaced with: %album%/

Default Script

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

$if($ne(%albumartist%,),%album%/,)

$if($gt(%totaldiscs%,1),%discnumber%-,)
$if($ne(%albumartist%,),$num(%tracknumber%,2) ,)
$if(%_multiartist%,%artist% - ,)%title%

From my testing it appears that both the default script and my modified version provide the same results: either 1) the album or 2) simply skip the step (in the case that there is no album defined). Specifically, my testing shows that for the latter case (no defined album) both the default script, and my modified alternative would return the same result: an album folder would NOT be created and the script would simply skip to the next part of the naming script, thus putting the file directly in the artist folder.

What am I missing here? Why is the default name script checking for a non-blank albumartist at all?

Thanks!

You can link your songs to standalone recordings. If this is a standalone recording, the albumartist is empty, and this script skips the album specific tags.

1 Like

Thanks Billy, that makes sense. Two follow up questions:

  1. On the second to last line the default script also uses albumartis. On THAT line is there any reason NOT to replace albumartist with tracknumber, as I’ve done below?

Default Script

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

$if($ne(%albumartist%,),%album%/,)

$if($gt(%totaldiscs%,1),%discnumber%-,)

$if($ne(%albumartist%,),$num(%tracknumber%,2) ,)
$if(%_multiartist%,%artist% - ,)%title%

My Script

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

$if($ne(%albumartist%,),%album%/,)

$if($gt(%totaldiscs%,1), Disc %discnumber%/,)

$if($ne(%tracknumber%,),$num(%tracknumber%,2) - ,)
$if($ne(%albumartist%,%artist%),%artist% - ,)%title%
  1. Does anything about my script above seem like it may have unintended consequences? I’ve tested it some, but before I run it to retag, rename, and resort 60GB worth of music I’d like to avoid any pitfalls.

I’m heading to bed now, so I don’t have time to look over your script right now. But the best way to avoid pitfalls is to copy some of your music files to a temporary location and run your script on the copies. That way, if anything goes wrong, your actual files aren’t affected.

For sure Billy. And thanks for your help. I’ve been testing on a duplicate dataset, and have been able to clean up my code a few times accordingly. I’m not seeing any problems now, but with thousands of songs (with old/bad tags and names) to be processed it’s very possible there are things I haven’t thought of to even check, that maybe someone much more experienced at this would notice quickly.

So, on that note, if anyone can help with my two questions I’d be extremely grateful.

  1. Thanks to Billy I understand why albumartist is used on the second line, but on the second to last line is there any reason NOT to replace albumartist with tracknumber, as I’ve done?

  2. Does anything about my script above seem like it may have unintended consequences? I’ve tested it, but before I run it to retag, rename, and resort 60GB worth of music I’d like to avoid any pitfalls.