FR: Variables for recording relationships

It would be nice if variables containing recording relationship information was made available for tagging in Picard.

I’d like to be able to tag remix recordings with the MBID of its remixer, and to tag remixes with their original recording MBIDs, for ease of linking between tracks on a media server.

I assumed Options → Metadata → Use track relationships would help, but it doesn’t.

I looked into creating a plugin for this, but with no tutorials and scarce documentation (for a beginner), I didn’t really know how to begin (even with my “moderate” knowledge of Python), so I’m currently manually creating these tags which is pretty tedious.

Anyway, I think it makes more sense for this to be implemented in Picard itself, given that you can get the artist and recording relationships of all recordings on a release in one API call (inc=recordings+artist-rels+recording-rels+recording-level-rels), which should be done when first grabbing the release (and I don’t think you can replace that initial API query in a plugin).

1 Like

If “Use track relationships” is enabled those additional relationships are part of the response The option essentially enables the artist-rels, recording-rels and recording-level-rels (plus a few more) inc parameters to be set.

So yes, a plugin could make use of this. An album metadata processor gets the webservice response for the release passed as a third parameter. It’s a dictionary of the deserialized data from a JSON response.

We have only few plugins actually making use of this data, but one example is picard-plugins/plugins/albumartistextension/albumartistextension.py at 2.0 · metabrainz/picard-plugins · GitHub

Generally yes. But we’d need to understand which variables exactly you would like to have available. Can you add a ticket with details on what data exactly you would like to have available to https://tickets.metabrainz.org/projects/PICARD/ ?

2 Likes

For what it’s worth, the Album Artist Extension plugin has been superceded by the Additional Artists Variables plugin, although both demonstrate the use of the information returned by the api.

1 Like

I was actually looking through your Additional Artists Details plugin for the v3 plugin API, and couldn’t really make sense of it.

I guess it makes sense the Variables plugin superceded it, given the artist information is included with the main release lookup, and can just be passed to an album metadata processor as outsidecontext says?

That’s interesting. So I guess only the MBIDs aren’t available as variables, but the names are?

Done, thanks! https://tickets.metabrainz.org/browse/PICARD-3201

1 Like

I started messing around doing something like this, but for the ‘recorded at’ relationships through event, place, and area entities. Very much unfinished as feature creep hit me as now want to make my own webservice class and hit the database for the deeper stuff. Such as I need to actually get events to resolve the ‘held at’ as it isn’t part of the rel

1 Like