A new MusicBrainz user script was released

I have been using this heaps!
I was wondering if it’s feasible to make a couple of improvements?

  1. Add a note in the edit note when this script loads something, with a link to this thread/the script. I want to let people know where they can go to make life easier + it helps troubleshoot if something comes up down the line (I wish all scripts did this x)

  2. Can urls be automatically run through Image Max URL and then the full image loaded? Then I can right click thumbnails to copy the URL, and plug it in directly!
    I currently open all the images in new tabs so that the max image URL script gives me the big URL, and then I plug that in. I end up with a lot of open tabs. I’m being greedy but this would be a dream if it was possible!

:heart:

6 Likes

Can I make one small suggestion/feature request? After an image has been successfully added, can it clear the input field? This saves having to clear the field manually when adding another image and gives extra visual feedback.

4 Likes

Thanks for the suggestions, both!

Done.

Done. Also fills the input link into the edit note.

+1 from me, but at the moment I’m a bit preoccupied with reorganising the code for easier maintenance and easier future development. This would be much easier to implement once that reorganisation is done. Tracking this in Integrate maxurl into the CAA URL uploader · Issue #22 · ROpdebee/mb-userscripts · GitHub.

9 Likes

This is not a new userscripts but it’s my NUMBER ONE USERSCRIPT (of the universe).
I have only just made a first wiki post for tracking discussions and updates about it.

mb. COLLECTION HIGHLIGHTER

This script shows you what release or recordings (among other MB entities) you already have in your collection(s) or are in other people’s collections, because there is no restriction on user.

Here I can see the albums I have, they have that purple highlight.
The non-highlighted albums, I don’t have them, yet.

Here I can see that in this vinyl edition, there is a bonus truck that I don’t have.
My CD edition does not have this acoustic version, it is not highlighted.

Because all recordings I have will be highlighted everywhere in MB, where they appear.
Same for works, artists, releases, release groups, etc.

Yes. it is BERY POWERFUL.

It’s the reason why I use MB.
It works on Firefox for Android 68, so I can check if I should buy this or that CD / compilation / special edition, when I am at flee market or second hand CD shop.

It should really be in MusicBrainz code itself, in my opinion:

Please all discussion about mb. COLLECTION HIGHLIGHTER should go to its now dedicated topic, below. :wink:

7 Likes

Image Max URL

Already mentionned in other topics by @IvanDobsky and @aerozol in this very topic, and not specific to MusicBrainz.

Its purpose is simple, it’s to get the full version of images that you see in websites.
It can be useful to get good front covers for digital releases, more easily, for instance.

It’s such a well-written and powerful userscript, it’s incredible!

12 Likes

Batch Add to Collection

Batch add entities to MusicBrainz collection and copy MBIDs from entity pages, search result or existing collections.

6 Likes

Paste multiple external links at once

Another QoL userscript, title says it all :slight_smile:

Example scenario: You’re adding streaming links to an existing release using atisket. What you used to do, is select each link separately and paste it in. All that clicking, selecting, Ctrl-V’ing and Ctrl-P’ing starts to get tedious after a while. With this userscript, just select all links on atisket, Ctrl-V, Ctrl-P it into the link input, and they’ll be split and entered individually. If you run into a link that contains spaces and shouldn’t be split, there’s a checkbox to temporarily disable the splitting.

Should work on every edit page that has the external link editor.

Install

6 Likes

Are you talking about releases that are already in the database? Because a-tisket already links all the links on a new add.

Okay. I’ve tried it out. Neat. Has nothing to do with a-tisket, just using the links provided by it. You can use links from any source.

2 Likes

Yes, adding a-tisket links to an already existing release was an example which I ran into frequently and was the main reason I created the script, but it works for any collection of links. Apologies for taking a while to answer, I was busy with other cool stuff. On that topic…

Enhanced Cover Art Uploads

Well, not really a new script, in fact, many of you will have it installed already :slight_smile: The userscript formerly known as Prince, uh, “Upload to CAA from URL” has been reborn as “Enhanced Cover Art Uploads” as its feature set now far exceeds what it used to do, and the title didn’t do it justice anymore. In a nutshell:

  • ImageMaxURL has been integrated into the userscript, so if you paste a URL, it will attempt to transform it into the largest possible version.
  • It’s now enabled on a-tisket and adds a link to the covers displayed on a-tisket to automatically send it to the script (saves you a couple of steps in uploading cover art from a-tisket’s post-submit screen).
  • You can now paste links to Apple Music, Spotify, Deezer, Tidal, Bandcamp, and Discogs, and it will search for covers in those pages and add them to the upload queue. Where possible, types are filled as well. Supported providers are documented here, and here’s a list of providers that aren’t available yet, but will be added in the future. I’ve definitely missed some popular ones, so let me know if there’s any others that you’d like to see added.
  • If you dislike copying and pasting, there are also buttons! Specifically, URLs to supported providers that are attached to the release get a button for one-click image import. It looks like this:

    So if you’ve got a release that’s linked to a Discogs release which has 43 images, all it takes is a single button click to add them all to the upload queue!

There is a bit of a caveat, though: To enable these changes, I had to significantly overhaul the script. I won’t go into too much technical details, but I made some changes that make it a lot easier for me to write the code, while still ensuring maximum compatibility with older browsers. As a result, the URL to the script itself has changed, so there is a possibility you might need to reinstall it, depending on your userscript engine and browser. It auto-updated fine during my testing, but YMMV. The current version is 2021.9.21. You might also notice that the script is now “minified” and just looks like random garbage, that’s completely normal and intended as a result of the development changes.

The new installation link is here: Install, source code

Finally, I’ve created a separate topic for support/feedback/questions/suggestions on this script and all of my others, which you can find here:

I’ll also be using that topic to post about smaller enhancements to other scripts when they arrive, so make sure to subscribe to it if you’re using any of my userscripts.

28 Likes

Freaking awesome!!! Wow. So many clicks saved.

2 Likes

Agreed - just tried this out on some older vinyl that usually only appear on discogs… Wow! Amazing job!

2 Likes

2 posts were merged into an existing topic: ROpdebee’s userscripts support thread

Import from Music Forest

Source | Install (GitHub)
Install (Greasy Fork) | Install (OpenUserJS)

Import releases from Music Forest into MusicBrainz.

Import from THBWiki

Source | Install (GitHub)
Install (Greasy Fork) | Install (OpenUserJS)

Import releases from THBWiki into MusicBrainz.

5 Likes

To celebrate the new year, I have released two new userscripts which should help you to add spoken vocals and copyright relationships faster. These are also teasers for the features which are still to come: Partially automated parsing of plain text credits and importing of (all) relationships from other sites like Discogs.

As a bonus I have finally released a few bookmarklets which I have been using for a while now and which had been buried in my (formerly private) feature branch for the above userscripts:

10 Likes

Not a new script but an old one that was apparently never mentioned here has a useful update for people dealing with parent works and subworks (mostly classical I guess with symphony/movements and opera/acts).

The Guess work/load subworks script is helping a lot to fill automatically the “edit relationships” page when consecutive tracks correspond to consecutive subworks of a parent work but has trouble dealing with tracks not corresponding exactly to the parent work structure:

  • there was a way to deal with a subwork split between different tracks (marking them as “partial recording”)
  • there was no way to deal with several subworks associated to the same track and this was solved in the new version 2022.1.28

There’s also an infobox 🛈 in the script now to explain what syntax the script expects for the different cases above

2 Likes

Artist Credits Helper

Split and fill artist credits, append character voice actor credit, and guess artists from track titles.

5 Likes

Export Brainz ratings (to a JSON flat file) is a very interesting userscript, written by @HebPlacesAGehen:

// ==UserScript==
// @name     Export Brainz ratings
// @version  1.1
// @include  /^https://musicbrainz.org/user/\w+/ratings/recording/
// @grant    GM.getValue
// @grant    GM.setValue
// ==/UserScript==

function download(filename, text) {
	var element = document.createElement('a');
	element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));
	element.setAttribute('download', filename); element.style.display = 'none';
	document.body.appendChild(element); element.click(); document.body.removeChild(element);
}
(async () => {
	let ratingDict = JSON.parse(await GM.getValue("ratings", "{}"));
	let $ratingContainers = document.querySelectorAll(".inline-rating"); for(let $ratingContainer of $ratingContainers){
		let $ratingEl = $ratingContainer.querySelector(".remove-rating");
		if(!$ratingEl){ continue }
		// Get rating
		let rating = Number.parseInt($ratingEl.text);
		// Get recordingId
		let $container = $ratingContainer.parentElement;
		let $anchor = $container.querySelector('a[href^="/recording"]');
		if(!$anchor){ continue }
		let recordingId = $anchor.href.split("/").pop(-1);
		if(recordingId){
			ratingDict[recordingId] = rating * 0.2;
			//console.log(`${recordingId} rated ${rating}`);
		}
	}
	await GM.setValue("ratings", JSON.stringify(ratingDict));
	// Get next page
	let $nextPage = document.querySelector("ul.pagination li:last-child a");
	if($nextPage){
		window.setTimeout(() => $nextPage.click(), 1000);
	} else {
		download("ratings.json", JSON.stringify(ratingDict, null, "\t"));
	}
})();

It does so much with a so small code!

I have just changed this JSON.stringify small parameter to get a more human readable download file:

--		download("ratings.json", JSON.stringify(ratingDict));
++		download("ratings.json", JSON.stringify(ratingDict, null, "\t"));
2 Likes
5 Likes

Apparently this is an old script, but @SothoTalKer just added it to the userscript wiki page so I tried it out. Pretty cool!

Display shortcut for relationships on MusicBrainz

Github

“Display clickable icons, without opening each entity page, for release-group, release, recording and work external links: e.g. Amazon, Bandcamp, Discogs etc”

3 Likes