Welcome Guest

Pages: 1
recording location import from MusicBrainz
mmccluskyPostApril 30, 2026, 14:19
Newbie
Posts: 3
Registered:
April 30, 2026, 18:10
Normal topicrecording location import from MusicBrainz

Trying to bring in recording dates and locations for things like 30 Days of the Dead from MusicBrainz. They are all well tagged there, but the information imported for the location is more detailed and granular than I would like.

For instance, on this release:
https://musicbrainz.org/release/7bfab286-4c26-4352-9dbc-07fc215b99ea

The first track was recorded at the Charlotte Coliseum. I'd like to import:

"Charlotte Coliseum, Charlotte, NC"

instead, I get:

Bojangles’ Coliseum (known as Charlotte Coliseum until 1988), 2700 East Independence Blvd, Charlotte, North Carolina 28205

which seems to come from: https://musicbrainz.org/place/dbb70e3c-3fdd-4f34-8d26-f20b89ca7601

Is there any way to simplify what comes in, so I don't get the complete address or former names?

Thank you, and for such an awesome program.

2MR2PostApril 30, 2026, 16:09
Avatar photo
Administrator
Posts: 2443
Registered:
August 23, 2012, 19:27
Normal topicrecording location import from MusicBrainz

Sorry ... it's just a chunk of text. There is no way to automatically sub-divide it. Whatever they provide, I store.

The issue here is that I can't even provide an action to generalize it as according to the MB guidelines, its free form text.

mmccluskyPostApril 30, 2026, 19:36
Newbie
Posts: 3
Registered:
April 30, 2026, 18:10
Normal topicrecording location import from MusicBrainz

Ah, crud. Yeah, I've been poking around the JSON from the API, and can come close to parsing it with something like:

const tracks = data.media[0].tracks;

const locations = tracks.map(track => {
const recording = track.recording;
const relation = recording.relations.find(r =>
r.type === "recorded at" || r.type === "engineered at" || r.type === "recorded in"
);

if (!relation) {
return { track: track.number, title: track.title, venue: null, city: null, state: null, date: null };
}

if (relation["target-type"] === "area") {
return {
track: track.number,
title: track.title,
venue: null,
city: relation.area?.name ?? null,
state: null,
date: relation.begin ?? null
};
}

const place = relation.place;
const venue = relation["target-credit"]?.trim() || place.name;
const city = place.area?.name ?? null;
const date = relation.begin ?? null;

const stateMatch = place.address?.match(/,\s([A-Z]{2})\s\d{5}/)
|| place.address?.match(/,\s([A-Za-z]+)\s\d{5}/);
const state = stateMatch ? stateMatch[1] : null;

return { track: track.number, title: track.title, venue, city, state, date };
});

console.table(locations);

2MR2PostApril 30, 2026, 21:21
Avatar photo
Administrator
Posts: 2443
Registered:
August 23, 2012, 19:27
Normal topicrecording location import from MusicBrainz

That way lies madness. While you could figure out how to parse that release you will see that there is probably no common ground with a fair number of releases.

I parse the MB format for the Title metadata for classical releases and I have pages of code to handle exceptions .... and it's still not perfect.

mmccluskyPostMay 1, 2026, 08:21
Newbie
Posts: 3
Registered:
April 30, 2026, 18:10
Normal topicrecording location import from MusicBrainz

That way lies madness.

Ha! Fair enough.

Pages: 1
Mingle Forum by Cartpauj | Version: 1.1.0beta | Page loaded in: 0.026 seconds.