Bug report: loujine - Copy dates on recordings

I’m not sure if this is the intended behaviour (I’m using Chrome as my browser).

When I try to use the “Copy dates on recordings” script from loujine it must be the FIRST action after pressing the “Edit Relationships” tab on a release. Otherwise it does just nothing.

My typical use case is copying dates of a live event to all the performers of a recording. First of all it ONLY works if the date is already set on the recordings “place” (it will NOT work if the recording has an “event” set with the date of the live live event.

For example in the following picture you see that the “recorded at: Amalie Arena …” has a date set … and thats why all the performers got the event by executing the loujine script. If I would have only specified the event “recorded at:
2023‐02‐01: Amalie Arena, Tampa, FL, USA
(2023-02-01)” which also has the date set … the script does nothing.

But what really bugs me is that the script only works when it is executed right after pressing “Edit Relationships” as the FIRST event.

The other bug has already been mentioned. Pressing one of the two script buttons “Copy Dates” or “Removes Dates” has no visual feedback except that it either works when being the FIRST action after “Edit Relationships” or it only pretends doing its work and adding a comment to the notes section if it is NOT called as the FIRST action after “Edit Relationships”

2 Likes

I’ve noticed problems with this as well but hadn’t narrowed it down as you have. This used to work, so recent changes in MB or in Chrome may have broken it.

This script doesn’t work with me since long time now. It just doesn’t do anything at all.

Same with another similar script, such as for instance: guessing the work does nothing at all

See Replace removed getSourceEntityInstance by reosarevok · Pull Request #115 · loujine/musicbrainz-scripts · GitHub - until @loujin appears and merges the fixed code, that’s the best we have I think.

3 Likes

How should I implement this fix exactly?

I replaced the link to mbz-loujine-common.js in the script by the gist link you linked to, but it doesn’t seem to fix the issue.

That should be all it takes, my own just has this instead of the original line and it works (make sure you save it and don’t update it):

// @require https://gist.githubusercontent.com/reosarevok/e9fc05d7f251379c301b948623b3ef03/raw/e635364e2c3a60578bb349a9a95483711f6c4e4d/gistfile1.js

2 Likes

I have no idea why, but it stays broken, whatever I try…

I did this fix earlier, a few months back, but at some point I remember doing something (I think I accidentally updated it) and since then I can’t get it to work.

I’d expect doing the same fix as before should do the trick… but no…

EDIT: oh… managed to fix it.

Removed it entirely, reinstalled and did the fix again.

But something is messed up: most of my louijine tools show twice, only one version works. I have no clue how this has grown that way… Managing my userscripts, I only see one script installed

It looks like this:

Oh, oh…

I discovered I had two userscript plugins running. Solved the issue!

2 Likes

This script has hung up on me. No idea since when, have been on editing break since this spring when it last worked 2025-03-02 (Edit #122762497 - MusicBrainz).

Brave browser / Violentmonkey (no other monkeys allowed on desk), all updated; script itself unresponsive – removed & reinstalled (and “executed right after pressing “Edit Relationships” as the FIRST event” as OP makes no difference).

Sibling script “Replace artists” works fine as of today ( Edit #135112066 - MusicBrainz ) in same configuration.

Would someone please baby-lead me through the exact steps of doing the gist magic by reosarevok above?

I don’t have Violentmonkey so I cannot guide you through the exact steps, but in case it helps: you will want to go to the dashboard, find the specific script, click through to the code editor (might have an edit button?) and switch the line that says

// @require https://raw.githubusercontent.com/loujine/musicbrainz-scripts/master/mbz-loujine-common.js

to say

// @require https://gist.githubusercontent.com/reosarevok/e9fc05d7f251379c301b948623b3ef03/raw/e635364e2c3a60578bb349a9a95483711f6c4e4d/gistfile1.js

2 Likes

Thanks. I have it up in browser (dunno else), set it to accept editing, and have it like this

so the bold-blue line there should be changed. How? Right-click does nothing, double-click does nothing, clicking the thin upward arrow opens another view of the entire code just without the @require line, and the leftmost @require is not linked at all.

Ahaa… The Code tab leftmost didn’t show any @require lines before me having set the monkey to accept editing. Now it did, could be overwritten, save&close – and now it works. Thanks again!

2 Likes