Tags available for use in scripts

I am testing how Picard makes tags available for use in scripts and cannot understand why some tags can and others cannot be used.
For example:


  • asin
  • media


  • composer
  • custom tags

What I’m trying to do is set the album name based on a tag set in the file (in my case a custom tag, which is also unavailable to scripting).

Is there some rhyme or reason as to what is usable and what isn’t?

Yes, file tags are in general unavailable to scripting currently, as the scripting is performed against the data loaded from MusicBrainz. No file in play here. See the following ticket for details:

1 Like

Thanks, but that ticket only refers to tags in files.
Not ALL MB tags are available. In addition to the list above:


  • lyricist
  • mixer
  • producer


  • script

These are all pulled down from MB by Picard.

The only commonality is that track tags seem to be unavailable, whereas album tags are. But I might be wrong there.

lyricist, mixer, producer etc. will be available. Do you see them in the metadata on a loaded track? If not, make sure you enable both “Use release relationships” and “Use track relationships” in Options > Metadata.

If you can see them in the metadata for a track the tags should be available in scripting as well.

1 Like

Must be a bug then, as I said, those tags are pulled down from MB by Picard (ie. I have use x relationships ticked).

Can you confirm please track-sourced tags are available in scripts on your installation?


Yes, works here. Can you give an example of a script and a release for which it does not work?

1 Like

Thanks for checking. (I tested on Windows too and had no joy).

Release is c8ff240f-844d-470c-9823-8b0c6685a0e0

Create a new script with the line:

$if(%TAG%,$set(album, banana))

For me the tags mentioned earlier to not match (track-sourced tags). When I use release-sourced tags the script works (sets the album name to banana). Singe or multi-value tags don’t make a difference.

Turn off all other scripts, and refresh the release. No need to add any files.


Works for me. E.g. with the script:


all tracks with a composer set (e.g. track 5 and 13) get the album name set to “banana”.

1 Like

Oh that’s interesting. When using release-tags, the parent object changes name (and the tracks). When using track-tags, only the track object changes. I guess that makes sense. I normally don’t have the album column displayed so I was missing that.

Thanks very much.

Not really. Picard has no concept of track level and release level tags. It only has a set of tags set for e.g. a track. The difference is just that if a tag is only set for a track it is only available on this track. If it is set on the release it is set for all the tracks. The script executes just the same in both cases, but if all the tracks have the same tag set the result will be the same.

1 Like

We might have different versions of Picard.
As I said:

When matching using the asin tag (release-sourced), Picard shows:

When using title (track-sourced), Picard shows:

Note the parent object didn’t change, exactly as I said.
And yes, I misspelt banana :slight_smile:

Yes, that’s what I tried to explain actually. The script gets executed against all tracks and also the release itself. There is no title tag on the release

1 Like

I can’t tell if we’re agreeing or not :slight_smile:

In any case, given that tracks can be tagged with different albums titles, the parent object should either show the common album title (if all tracks agree), or Different across… if not.

All in all, problem solved. Thanks for your help.