Script set-recording-comments.user.js

If I could work out what to install Iā€™d give it a run aroundā€¦ can I get a linky for us non-gits and Iā€™ll attempt to break if for you. Pressed loads of buttons and worked it out. Will let you know if I break it.

Edited to add: Button is back!! Woo!! and Yay!! Happily appears on a 1CD or a 10CD album without care. Quick tested a few disambigs to see if it works. Nothing exploded. Happy on Vivaldi \ Violent Monkey \ Windows.

2 Likes

It still doesnā€™t work on a 10 disc album. The mediums that are dynamically loaded will never receive comment text boxes.

1 Like

I did the test changes on a four disc album. It was more the fact the button appeared and stayed on screen was the key on the 10CD album. So no regression.

Just had a quick look and seems working as before.
Will test more when will make some edits.

Regarding the problem of multiple CDs there could have a a workaround by trying to make it work when loading directly a specific medium from a release: Release ā€œClassic Chu Berry Columbia and Victor Sessionsā€ by Chu Berry - MusicBrainz

1 Like

The fix has been merged this weekend and since there have been no complaints about issues with other browser setups, I would consider this as solved for ā€œnormal releasesā€.

Regarding the usage for medium 11+ on bigger releases I am not even sure if this had ever worked (or I never needed this script for such a medium which is collapsed by default). The trick @ulugabi mentioned should help in these cases, right now every(?) userscript which I am using seems to struggle with these dynamically loaded mediums and a thorough fix would require more work.

4 Likes

I use Tampermonkey on Edge and moved this script to run last and I still have to reload the page on every release page even on singles.

1 Like

The following from the script would seem to stop the script from running when when adding ā€œ/disc/6ā€ for the workaround. Itā€™s actually working for some people?
@exclude *musicbrainz.org/release/*/*

I can say I havenā€™t yet found a way to use this script for disc >5 using Firefox + Tampermonkey.

1 Like

Hi @ulugabi, very good idea, this basic work-around to load disc URL!!
I have included it in this new PR:

The previous @kellnerd document-idle fix was no longer enough for my browser.
React would still remove the button 9 times of 10.

For what itā€™s worth, here are the real pending pull requests (they are little bit lost among automatic pull requests).

Update (2022-02-17)

Delay script OK it fixed for me.
But the medium URL work-around was not working and was quickly fixed by @kellnerd.

2 Likes

I seem to be having trouble with this initially loading comments from another medium.

Ah yes of course.
The work-around is only a work-around to enable the script for all the tracks of 1 particular medium. A medium that would otherwise be ignored as being collapsed.

Right. I installed the version with the pull request included. I added ā€˜/disc/4ā€™ to the URL. I clicked the button to show the comment boxes. They were already populated with the comments from another medium (medium 3, I think). The script got a little confused, and boxes were not red that should be (it thought the comment was not changed, even though it was a new comment). Still, it did seem to set the comments on all of the recordings.

2 Likes

Also, if I recall correctly, after setting the comments, if I loaded it the same way again, it would have the comments from another medium again, rather than the actual comments.

1 Like

Oh crap, @kellnerd, can you revert my change, urgently? But keep the timeout?
Sorry guys.

I guess a proper fix would be the better solution, so I created a PR instead:

This time I would like more people to test or review this before I will merge it :sweat_smile:

(The last time I only checked whether the script was loading any comments, but I did not verify whether these were for the correct recordings. For this PR I actually did an editing test with @ulugabiā€™s example release on the test server and it worked.)

2 Likes

Please @dkg, could you test this with the release you wanted to change recording comments?

You can just middle-click or Control-click the 4th medium (collapsible) header, to open the medium-centred page.

Sorry for braking this, without testing more than the mere display. :woman_facepalming::bowing_man:

Hopefully it only breaks when using that quite obscure hardly known work-around (which is not even a work-around, as it never could have worked without your change, @kellnerd).

Iā€™m not sure what youā€™d like me to test. Using middle-/control-click just opens the same URL as typing it in. The results from the script are the same either way.

The middle-click trick is just a shortcut which spares you from manually changing the URL, it does not have any effect on how the userscript behaves.

We would like you to test the (hopefully) fixed version of the userscript (install link for the above PR) with your multi-disc release before the changes will be published for all users.

1 Like

Thatā€™s what I said. :slight_smile: And I find it faster to type it into the URL.

Ok. Looks better now. Thanks guys.

2 Likes

Thanks a lot
Tested in prod for some tracks of CD6 from the upper release and was working fine:

  • Load the data for the recording comments from the selected disc
  • Red box appear only around the ones changed (and mass edit box also worked)
  • When applying change the correct edits are created (= not creating more edits or impacted other recordings than the ones selected)
1 Like