Help with Metadata

Tags: #<Tag:0x00007f0ea75e7ec0> #<Tag:0x00007f0ea75e7df8>

Hi folks,

I’m trying to make tagging music as automated as possible, I have a custom tag that the Georgia foobar theme uses called “artistcountry” I’m trying to get Picard to scrape that information from MusicBrainz, but there doesn’t seem to be a tag for it despite having one for release countries, wondering if anyone could help here, thanks in advance!

1 Like

When Picard requests data from MusicBrainz there is more data sent than is made available as standard by Picard - Picard only extracts stuff that fits with standard tags.

But Track / Album metadata plugins can examine the data and see what else has been sent e.g. in the album or track artist part of the data.

Alternatively, like Album Artist Website plugin, you can run a separate query against an artist to get additional data which is not provided in the album web service response.

You would need to research and write a plugin for this.

P.S. Albums / Tracks can have more than one artist - so you might get more than one country. How would you want to handle this? Select the first artist, handle all artists?

1 Like

Personally I’d handle it like this, for example:

Artist 1 = America
Artist 2 = Japan

Artist 1 feat. Artist 2
America; Japan

While I was looking around for a plug in that could do this I came across Additional Artist Variables, would something like that work, adapted to my needs? I’m not a programmer so I wouldn’t know the first place to start otherwise.

  1. You need to examine the XML / JSON of the WS response for the request issued by Picard to see if the data you want is provided as standard, Set debug messages and look in the debug log to see the exact WS URL issued and paste it into your browser to see the xml rersponse. You may need to set Options / Metadata / Use xxx relationships to get he data you want.

  2. If the data you want is in the XML, then the plugin you need simply needs to read the WS response and find the data you need. There are several such plugins that do this you can use as a basis.

  3. If the data you want is NOT in XML, then you will need to make a whole new Artist WS request and process the response. You will want to cache the answers to avoid sending the same request literally tens or hundreds of times. As a starting point, base your code on the Artist Official Website plugin (which I wrote) which has a caching mechanism - please feel free to plagiarise.

Unfortunately, this does require Python coding skills. Good luck.

1 Like

Thanks for the help, I have a friend who knows a little about Python, so hopefully they can help too!

1 Like

We all have a friend (or a friend of a friend (or a friend of a friend of a friend…)) who knows a little about Python. :slight_smile:

Haha, something else, if you don’t mind, where do you find this XML/JSON file? I can’t seem to locate it in the debug window

Open the debug window - set verbosity to Debug.

Load an example album.

Look in the debug window for a UR|L like https://www.musicbrainz.org/ws/2/release

2 Likes

Found it, thank you my dude, I found this:

area id=“489ce91b-6658-3307-9877-795b68554c98”
name>United States</name
sort-name>United States</sort-name

This should mean that this shouldn’t be too hard to implement.

I could swear I had artist country in my tags years ago before I got a new compy/reset Picard. I still have the tags on any files I haven’t re-tagged since…

But when I asked on the forums what plugin it would have been everyone just looked at me funny (with their written words if you know what I mean). There is a chance I did something weird but I’m sure I just ran the files through Picard and nothing else.

That’s no help in finding a plugin sorry, but thought I’d share :grimacing:

Maybe you added those in by hand and forgot? Whatever the case hopefully me and my friend can figure this out and have it automated for everyone, the less manual tagging we have to do the better!

1 Like