I tried variations as well
$if(releasetype,album/soundtrack),$set(genre,Soundtrack)
$if(%releasetype%,album/soundtrack),$set(genre,Soundtrack)
$if(releasetype,“album/soundtrack”),$set(genre,Soundtrack)
$if(%releasetype%,“album/soundtrack”),$set(genre,Soundtrack)
I would love to see where I went wrong here.
Thanks
First off: you need to have all the if clauses inside the if statement. If you do $if(foo,bar),$anything_else_here() (noticed how the parentheses are paired) the $anything_else_here() will always get evaluated. You need to do $if($eq(foo,bar),$anything_else_here()).
Anyway, on top of that, %releasetype% is a multi-value variable, so you want to use $inmulti(). Try this and see if it works for you:
$if($inmulti(%releasetype%,soundtrack),$set(genre,Soundtrack),$noop(We could set %genre% to %genre% here, but %genre% should already equal %genre%, so…))
(Note that there’s also a “hidden” variable %_secondaryreleasetype%, but I’m not sure how that works for releases with multiple secondary release types.)
Ok thanks so much for the help
Really appreciate learning the inmulti
So I tried
$if($inmulti(%releasetype%,soundtrack),$set(genre,Soundtrack,$noop)
But I have an error that won’t let me "make it so"
It says unexpected character ‘)’ at position 69…
Basically it doesn’t like the last set and I don’t know why?
To add on to what @InvisibleMan78 said, $noop() does nothing, but it’s still a function, so if you write $noop you have to follow up with a ( and ), so
One other question - if I wanted to add “Soundtrack” to the genre - in addition to the other genres, then I guess it would be a different command right? It wouldn’t be $set … but what would I use in that case?