Topic: After update Picard 0.16 to Picard 1.0 renaming fault

In Picard 0.16 were two renaming fields one for single albums and an optional other for various artists albums.
In Picard 0.16 I had:
1) $if2(%albumartist%,%artist%)/$left(%originaldate%,4) - %album% (%releasetype%; released %date%)/$num(%tracknumber%,2) - %title%
2) $if2(%albumartist%,%artist%)/$left(%date%,4) - %album% (%releasetype%; released %date%)/$num(%tracknumber%,2) - %artist% - %title%

After upgrading to Picard 1.0 there was an merging of those two renaming scripts.
In Picard 1.0:
$if($eq(%compilation%,1),
$noop(Various Artist albums)
$if2(%albumartist%,%artist%)/$left(%date%,4) - %album% (%releasetype%; released %date%)/$num(%tracknumber%,2) - %artist% - %title%,
$noop(Single Artist Albums)
$if2(%albumartist%,%artist%)/$left(%originaldate%,4) - %album% (%releasetype%; released %date%)/$num(%tracknumber%,2) - %title%)

I get now the following fault:
Unexpexted character '(' at position 57, line 3

What can I do ?

Re: After update Picard 0.16 to Picard 1.0 renaming fault

After a lot of trial and error, I have found an solution:
$if2(%albumartist%,%artist%)/$if(%compilation%,$left(%date%,4),$left(%originaldate%,4)) - %album% (%releasetype%; released %date%)/$num(%tracknumber%,2) -$if(%compilation%, %artist% -,) %title%

Is this correct ?

Re: After update Picard 0.16 to Picard 1.0 renaming fault

That will work. The error is because the "conversion" to Picard 1.0 isn't smart enough to handle your original strings properly. Sorry about this. The alternative to doing what you've done would be to prefix the ( and ) around your type and date with a \ to escape them in the "converted" string in Picard 1.0, e.g.

\(%releasetype%; released %date%\)

This is required since the default logic puts your entire two strings inside a $if.

Re: After update Picard 0.16 to Picard 1.0 renaming fault

Thanks for the answer.
But it will take a while to understand the scripting language.
You are definitely The Forum Dude.