Can the "set recording comments" script be modified to apply disambiguation comments to Works?

Specifically, the Parts of a soundtrack in a Work page. For example, I want to apply “Armored Core: for Answer” too all Works here.

This is the script, but this applies only to Recordings rather than the original Works (I’m guessing it’s if you wanted to add “live 1989” or whatever to the disambiguation comment). Maybe set it to copy the title of the Work page into the Disambiguation Comment field.

1 Like

I think it would be difficult to modify this userscript as it uses an undocumented, internal API of MBS to submit its edits. It was written by @Bitmap who is also one of the developers of MBS itself, so he probably knows whether that’s possible and what has to be done. I think I had already tried to submit a different kind of edit through this internal API and failed many months ago.

But luckily you have the same need as I had two years ago. Back then I modified @loujin’s Replace subwork titles and attributes in Work edit page userscript to add a new function which replaces the disambiguation comments of all subworks (of the currently edited work) with a custom text.

I have never submitted this feature because it’s just a quick and dirty copy-paste-adapt modification which I rarely needed since then, but it should still work. You can install my modified version from here:

Just let me know if the additional feature is useful and I might submit a PR and do some refactoring to clean up redundant code.


THANK YOU. That is exactly what I was looking for. It’s very useful and it seems to work as intended, I recommend a PR. I overlooked that original script, too, so I’ll double-check the rest and see if I need anything else.

1 Like

just a heads-up, an unexpected edit just came from your script… it deleted an ASCAP ID, don’t know why

Edit #89091254 - MusicBrainz.

edit: it seems to happen with all work attributes, Edit #89091422 - MusicBrainz


Yes, a proper work edit must submit all existing values, not only the ones you are changing.

When you debug a userscript that makes some actual edits, you can test it at
Erg well at the moment, the test server seems rather broken, at least on mobile.


@UltimateRiff It’s a general bug, not just one of my modified version. I guess I did not notice it so far because when I used this script the last time, work IDs weren’t really a thing and I had usually set the disambiguation comments on freshly generated works only (which don’t have any data that might be lost).

In any case, this is something which should be fixed in @loujin’s helper script, which only preserves key attributes so far:

Oh, and it has already been reported on GitHub, I just wanted to create an issue myself: