Clone relations in Release Editor

@loujin, sorry if i am being too persistent on this topic, but how hard it would be to create such script? It will easy my editing on MB a lot, that’s why i am so curious.

Not hard, but the problem is maintaining the scripts in the future, especially scripts I don’t have a use for myself. So just writing it now doesn’t mean I will update it in the future or fix bugs, let that be clear.

That being said, https://github.com/loujine/musicbrainz-scripts/blob/set_writer/mb-reledit-set_rec_artist_as_writer.user.js can copy recording artists to the related works as "writer’ relationships

6 Likes

Thank you, @loujin, but i have now rather a stupid question - how to use it? xD Lets say i have added a new release and now want to create new works and assign (copy using your script) writers there. I open a relationship editor:
https://musicbrainz.org/release/eacdecf4-22dd-42ad-94c5-5a6a93400051/edit-relationships
Now i select one (or all) recording(s), click batch-create new works and then click an “apply” button from your script to transfer writer credits? Or should i before using your script attach (by submitting) these newly created works to recordings to form a link between them?

Anyway nothing is happening for me either way. The only thing i see after click an “apply” button is editor comment: —
GM script: “MusicBrainz relation editor: Set writer relation from recording artist” (2021.4.4)

I am using tampermonkey on chrome if that matters.

Normally you should first select the recordings you want (with the usual checkboxes) then click Apply. But it seems the script is not working on the release you linked, because there’s no explicit artist credit in the recordings. I’ll have to find another way to find the recording artists

Edit: should be fixed now with version 2021.4.5. Note that the script will need 1 second per recording because I have to use the API to get the necessary info

Thank you, @loujin. This script will be useful a lot. :slight_smile:

The only question - is it possible to add credits not as “writers”, but as “composers”? I suppose this line determine that, but i wasnt able to figure how to modify it:
target: credit.artist,

As far as I remember you have to add something like dialog.relationship().linkTypeID(168) just before the dialog.accept() line. I can’t check right now

3 Likes

Yep, that worked perfectly! Thanks again for the script. :slight_smile:

1 Like

:partying_face: @loujin has released a new version with a great new feature:

2 Likes

@loujin: if it’s relatively trivial, could this be expanded to copy rels from one medium to another? Use case being stuff like this release that has stereo + multichannel recordings with the same content:

I found a relatively easy way to define a range of “source” recordings to take relations from and applied on the other selected recordings (i.e. defining source as “1-4” on 12 selected recordings will apply the relations on recordings 5-8, and again on 9-12). So no management by medium, still have to count tracks to be used :slight_smile:

That’s version 2022.1.28

Oh and there’s an info box 🛈 next to the input box to remind you of what syntax is recognized

3 Likes

@loujin does this script handles coping rels from entirely different release ?

My case, this is a new release that I added

Clearly a compilation. The last CD is identical to an original release (so are the other discs)

I’m trying to copy rels into new from the original

I have marked all the checkboxes for the last CD but Apply does not seem to have any effect.

Am I using it the wrong way or did I misunderstand what the script is supposed to do ?

Hi nadl40,

The button on your screenshot wil copy only release rels (e.g. on https://musicbrainz.org/release/b55c67c0-7485-4613-9ef2-8c576fcec650 it would copy the conductor-release and orchestra-release rels), but you don’t have release rels here.

I don’t think the other option (clone recording relations) can copy rels from N recordings of a separate release to N recordings on yours, only N to N recordings on the same release or 1 to N from a different release.

1 Like

Thanks for the explanation, I might give it a shot at copying recordings on a Recording tab from one release to another, that would help with compilations that combine more than one release.

Here it is, it will copy recordings from one release to another. Requires webdriver.

1 Like

Sorry if i am resurrecting an old thread, but after recent server update this script stopped working. If it’s possible, @loujin , could you update it? This script is simply a “must have” for me.

1 Like

The problem is known and the first userscript has already been updated:

3 Likes

I’m on it, it took me a long time to update the first ones so hopefully it will go faster for the next ones

4 Likes

The script (and the other relationship editor scripts) should be up-to-date now. The only regression I know of (and don’t really want to spend time fixing) is that you cannot anymore clone “pending” relations you just created in the editor. You need first to save the release with the new relation, then you can clone the relation to other recordings in a second step.

4 Likes

Em, this one is still not updated or i am missing something?

I also had trouble with “Guess related works in batch” version
// @version 2023.3.6

I tried to use it on CD 46-49 of

Work rels did not populate, only the Note box did.

I can create a new topic if required.

1 Like