Batch add to collection and batch copy MBIDs

Tired of clicking recordings from release page just to add them to your collection?
Feeling annoyed waiting for page refresh after every “Add to collection” click?
Want to copy multiple MBIDs at one click?
Want to add multiple entities to your collection at once?
Want to copy-paste between collections?

Here it comes —

MusicBrainz Batch Add to Collection

A table without checkboxes is not a good table.

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


Batch add from entity pages

Also support the following pages: area, artist, label, place, release group, series and work

Use existing checkboxes if available

Support artist page subtypes and pagination, also works on area & place pages

Batch add from search result page

Automatically determine collection type from search type

Copy-paste between collections

Automatically detect collection type

Batch copy MBIDs

Set this option to true, and a “Copy MBIDs” button will appear.

// To enable "Copy MBIDs" button, set this option to true
const SHOW_COPY_BUTTON = true;

Known issues

  • Checkboxes cannot be initialized if medium is collapsed
    • Workaround: Append something like /disc/9 to the end of URL, so it’s expanded when page is loaded
  • Sometimes checkboxes cannot be initialized correctly due to a conflict with other userscipts
    • Workaround: Refresh the page

If you find any other issue, feel free to report it here or open an issue on GitHub, it has so many possibilities so I can’t test them all. :smiley:


This is amazing! I don’t use collections much but wow does this make me dream of similar functionality for editing :exploding_head:

A bit off topic but definitely inspired by all the checkboxes, is it just me who would find life so much easier if this was a thing?


Just to make sure that I understood what you want to do here: You are on the editing page of that work and are using the inline search to find its recordings, right? And then you are adding a “recording of” relationship for each matching result and would like to be able to select all matches at once to speed this up?

Have you already tried the above userscript to add recording-work relationships? I think it is far more comfortable to batch-add works to recordings from an artist’s recordings page.

But for relationship types other than “recording of”, I agree that it would be nice to relate the currently edited entity to multiple other entities at once. Coincidentally I have created a bookmarklet to achieve this just two days ago :joy:
Its original purpose was to allow adding multiple entities of the correct type as “part of” the currently edited series, which is a really dull task for these audio drama series with dozens of episodes (my old workflow was to repeatedly open a new relationship dialog and drag&drop the RGs from another browser window).
But I just tried to use my bookmarklet on a work’s edit page, fed it some recording MBIDs and it just worked out of the box. So I have gone ahead and simply renamed it and rephrased its decription :grin:

Since this is still a bit rough (it performs no validation of entity types and always uses the default relationship type) and it is based on some work-in-progress code I have not yet published it in my main GitHub repository. It accepts any text which contains MBIDs as input, so you can feed it with entity URLs or enable the “Copy MBIDs” button and use its results which you can obtain e.g. on a search results page.

Apologies if my answer is too much off-topic, but I thought I should mention my bookmarklet here since it works best in combination with @yyoung’s fantastic userscript and @aerozol basically asked for it :innocent:


Just tried both in conjunction with @kellnerd’s bookmarklet
Works like a charm!

Thank you!

1 Like

Sorry about the late reply @kellnerd, I wanted to make sure I had the time to look at everything properly!! Thanks so much for the detailed assistance.

Yes, but notably I’m usually relating cover versions - otherwise @murdos’ userscript would be perfect! I usually want to link a cover to the original, and then while I’m at it I add any covers from other bands that pop up as well as any matching recordings from the original band. So the recording search results are pretty spot on, e.g. this result. Just crazy hard (sometimes impossible) to tell what recording you’ve already added when the search result keeps shuffling.

But I have installed it and it’s definitely going to come in handy, thanks heaps for the link :open_mouth:

Re. your bookmarklet, I couldn’t quite figure out how to get it to improve my workflow - snip -
OMG never mind, in conjunction with the “Copy MBIDs” button this is perfect!! Thank you!

If anybody wants to see what I can do now:
(first half is using copy MBIDs courtesy of @yyoung, the second half uses @kellnerd’s bookmarklet)


edit: don’t want to hijack the topic anymore but btw I’ve still made a ticket re. my bugbear of not being able to see what recordings I’ve already selected from a work page search, for editors who don’t use scripts


Hi, I know it’s been quite a long time since this topic was updated, but I’ve installed this userscript and it isn’t working, there’s no buttons on any page and it does not appear to be executing.

I’m on Chrome Version 108.0.5359.125 with Tampermonkey 4.18.1.

Sorry for reviving an old topic

Thank you in advance!

Hi, I’m using the same Chrome and Tampermonkey version with you, and it’s still working. Are you using the latest version (2022.6.2) of this script? Have you try to refresh the page? Can you see the script in the popup of Tampermonkey on MB? Could you provide an example of link where it isn’t working?

I’m looking at using this script to add a bunch of recordings to my owned recordings collection, and I’m wondering if it’s possible to copy the recording MBIDs from my files to the Batch add to collection script…

I’ve already kinda guessed at how to collect them all on the PC side, maybe by using the $is_complete function in Picard to seperate them out in my filesystem or something, or worst case going through my library manually… the issue is getting the MBIDs into my clipboard or wherever they’d need to be

This script does not support adding from clipboard, but that’s a good idea and would be easy to implement.

If you have already tagged the files with MBID, maybe you can use a script to collect them automatically.

1 Like

A new version (2023.5.26) has been released with the following improvements:

  • Support adding entities from clipboard MBIDs, see the button on the collection page
  • Support adding a large number of entites (>400) by splitting into chunks