Picard Scripting Help Requests

Tags: #<Tag:0x00007f41a3e869f8>

This thread is a catch-all for requests to help with tagging and file naming scripts for MusicBrainz Picard. For example scripts that have already been developed, please refer to the thread:

If you already have a start on your script and need help resolving an issue (something isn’t working as intended), please post a copy of the script along with an explanation of what it is doing (or not doing) that needs to be fixed.

If you haven’t yet started, please provide a thorough description of your needs with examples if possible. You should also have a look at the Writing a File Naming Script tutorial in the Picard User Guide for more information to help you get started.


Copying the post from the old thread and adding link to the release I’m trying to tag
I’m trying to tag this release but I get the annotation from this other one

And this is an example of one release working properly.

There seems to be a mistake in my approach for this, I’m trying to get the disambiguation comment, if any, and append it to the Album field of a release. But if it doesn’t find one in that specific release, it uses another release comment as fallback.

$set(album,$if(%_releasecomment%,%album% [$title(%_releasecomment%)],%album%))

I’m matching the CD version but I get the Digital disambiguation comment

If it does have a disambiguation comment, then it gets the correct one

I can’t seem to reproduce the error here. When I use this release:

I get no comment in the %_releasecomment% variable, but when I use the release:

I get “Mastered for iTunes” in the %_releasecomment% variable.

Your screen shots didn’t show it, but if you scroll down to the MusicBrainz Release Id setting, is it “64d7c880-e76b-4792-9fb5-a479903243fe” or is it “11961fc7-c4d6-4f7c-a808-222e593bc12b”? If it’s the latter then it looks like you’ve somehow selected the “Mastered for iTunes” release.

1 Like

That looks like a bug to me rather than a scripting error, but it is unclear whether it is a bug in MusicBrainz (i.e. incorrect data sent to Picard) or in Picard (incorrect interpretation of data sent).

1 Like

In fact there are other glitches in the screen shots - the one for the iTunes version also shows the catalog number and media type have changed (even though they have the same values).

So not sure what is going on.

1 Like

@Totosaurio3279, what version of Picard are you using and on what platform (linux, windows macos)? Also, what plugins (if any) do you have installed, and which ones are enabled? As @Sophist mentioned, something looks strange, and I’m wondering if it’s possibly something from a plugin. Thanks.

EDIT: Another thought… Were the files previously tagged using the digital version release id? If so, it may be reloading that release’s information automatically if you have the Ignore MBIDs when loading new files option unchecked.

1 Like

Version 2.6.3 on Win10

That was it! That fixed it, thanks!

1 Like

Excellent! Good to hear that you have it working, and glad that we could help.

I need help with figuring out how to make Picard not overwrite a specific tag (lyrics) if it’s not empty.

@gzippedfrog are you using a plugin to add new lyrics?

A default Picard doesn’t add Lyrics, so you probably just need to add the lyrics tag to the “preserve these tags” list.

1 Like

Thanks, that did the job. And yes, I used plugin to add extra lyrics.