Hi there. I’ve been using a Picard tagger script for ages and I’ve recently spotted a bug that I’m not sure how to solve.
I like to display the Composer field in my music player. When some recordings have a Writer but not a Composer, I want to copy Writer to Composer. But only if there is no Composer. So I’ve been using this script:
My problem is that if I have an MP3 file that already has some bogus tags in it (for example Composer = “banana”) and MB has no Composer, but Writer = “John Smith” then my tagger script won’t overwrite “banana” with “John Smith”.
I work around this by ticking “Clear existing tags” to get rid of bogus tags. But now if I load the MP3 into Picard the 1st time, it clears the Composer tag. If I save, quit and reload the MP3 into Picard a 2nd time, it now fills in the Composer tag from Writer. But if I load it a 3rd time, it removes the tags again!
I could simplify my script my dropping the $if() conditional, but I don’t want to unconditionally copy Writer to Composer if there is already valid data in Composer.
Is there a way to tell in tagger scripts whether a tag value has come from the MB API or whether it was read from the MP3? Thanks