[SOLVED] Script help with changing genres to personal ones

Hi!

I thought this should be easy but failed… For some reason, I like to have my own genres, at least as “main” genres. For example, I don’t listen that much to rock and pop, so I tag them manually as “rock & pop”.
So, with my limited knowledge of scripting, I thought I could create several small scripts to automatically change at least some of the files I’m running through Picard.

$if($in(%genre%,pop),$set(genre,rock & pop))

(alternatively with $setmulti for future sub-genre tagging) is what I thought would work, but it doesn’t. The album I’m trying it on is still tagged as “Pop”. What am I doing wrong? Any help much appreciated!

2 Likes

Works for me, but your problem probably is that $in is case sensitive. Try:

$if($in($lower(%genre%),pop),$set(genre,rock & pop))
2 Likes

Very very strange, it still doesn’t work. I’m 100% sure it’s my fault for some reason, but I still don’t understand why. I have unchecked all other scripts, and tried with changing only to “rock” to skip the &, but nothing helps. Since this is most probably a user error and not a bug, there’s no error log that would help, right?

Thanks for helping out though!

Edit: Hmm.Just for trying, I took a Slayer album with Trash Metal as genre, copy-pasted Trash Metal from the tag into the script (and removed the $lower part) but still no effect. I’m guessing this really has to have a local reason o nay computer/installation. No idea what though!

Just to be sure: You have set this script under Options > Scripting, and the script is active (checkbox checked), right?

This script won’t do anything useful if you e.g. put it in the filenaming script.

1 Like

Yes, that’s how it’s done. Wise question though!

Ok @outsidecontext, let me thank you again for always trying to help out. It turns out, not surprising, that it was indeed my own fault. I had put genre in the “preserve these tags” and forgot all about that…

1 Like

Thanks for the update and glad you have it solved. I wouldn’t have thought about the preserve tag setting, something to keep mind for similar questions :slight_smile:

3 Likes

When I thought “I give up, let’s reinstall MB”, I started to take pics of my settings, and when I got to this, I just realized :joy: Thanks again for always helping out and doing so in such a friendly manner.

Shouldn’t one use $inmulti(…) instead?