File naming help (I know it's a super original topic but I hit a wall)


#1

What I want follows:
If %_multiartist% = 1, disc#-track# - Track Artist – Track Title.extension
e.g. “4-25 - Washboard Sam – Life Is Just a Book.mp3”
Elseif %_multiartist% = 0, Artist - disc#-track – Track.extension
e.g. “Old Crow Medicine Show - 24 – Cumberland Gap.mp3”

This is what I have
$if(%_multiartist%, $if($gt(%totaldiscs%,1), %discnumber%-$num(%tracknumber%,2) -
$if2(%artist%,%albumartist%), $if2(%albumartist%,%artist%) $if($gt(%totaldiscs%,1),
%discnumber%-$num(%tracknumber%,2)))) – %title%

and what it is giving me is correct for _multiartist=1, but for =0, it is giving me – track.extension.

What am I missing here? I’m trying to go, if it is a multi-artist album, then do the first set, else do the second set, followed by the – title.

Thanks


#2

I think you just had a couple of misplaced parentheses. Have a look at the following and see if that does what you want:

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

#3

A post was split to a new topic: Help with file naming with special rule for soundtracks