Putting MusicBrainz annotation into track comment

Tags: #<Tag:0x00007f739f6eb008> #<Tag:0x00007f739f6eaf18>

For some releases I’d like to copy the annotation on a release into the comment tag of the file in Picard. For example, this release on musicbrainz:

Has the tracklist in the annotation and I’d like to be able to have that added as the comment on the mp3 I have of it. I’d tried to google around and also searched the forums here and the read through docs on picard, but I don’t see any mention of the Annotation being available in picard. Is that right? If so if there a relatively easy way to get it instead?

Thanks in advance.

As far as I know this is not currently possible because the annotation text is NOT part of the Webservice response from Musicbrainz. I am not even sure whether the annotation is accessible via a webservice call at all.

I guess it is always possible for you to write an album metadata plugin that either makes another webservice call or screen-scrapes the release web page to get the annotation.

The API can expose the annotation, it’s just that Picard apparently does not make it available as a variable.

1 Like

Thanks guys - this at least gives me a starting point. I’ve filed a JIRA for support here: https://tickets.metabrainz.org/browse/PICARD-2124

In the meantime I’ll take a stab at a tagger script to pull it in via the webservice and share here if I manage to get it working.


Yes - I was wrong about it not being available in the API - and @outsidecontext has been a star yet again and coded a fix at https://github.com/metabrainz/picard/pull/1750. So no scripts or plugins required from the next version. You can even try it in the PR dev version which can be found in the artifacts [sic.] dropdown in the top-right of https://github.com/metabrainz/picard/pull/1750/checks?check_run_id=1952679709.


It was simple enough to add without any implications and I think just makes sense :smiley:

Just to also to have this noted here: This was easy to support for the release annotation. Not so much for e.g. recording, release group or artist annotation. This would require either a change to the web service or additional requests. If this is wanted I would for now recommend having a plugin for this.


Wow! Thanks for the quick turnaround!

I can confirm - it works beautifully! The script in case anyone needs it is simply:

$set('comment', %_releaseannotation%)

Thanks again!