Seeder - Is broadcast not available for primary type?

Tags: #<Tag:0x00007f58f0255468>

Hi,

I’m trying to write a user script to seed some mixes. I have most of it working, but for some reason I can’t get the primary type set to broadcast, and similarly I can’t seem to set the secondary type to DJ Mix. I tried:

let release = {
    ...
    type: 'broadcast',
    secondary_types: ['dj-mix'],
    ...
};

And other variations with different cases. Is it just not supported? I checked https://musicbrainz.org/doc/Development/Release_Editor_Seeding and I can see neither are listed in the docs:

type

The type(s) of the release group that will be created. Possible values: album, single, ep, compilation, soundtrack, spokenword, interview, audiobook, live, remix, other (this can be specified multiple times to select multiple secondary types, though only one primary type should be specified).

I wasn’t sure if it’s just missed from the docs or not supported at all. I tried also looking in JIRA and couldn’t find anything. Before I file a JIRA I thought I’d check here.

Thanks

5 Likes

Check what values you can find in the <select>, in the edit release group page source code.

So I did look that at those and the value is just a number. Is that safe to use?

1 Like

I tried with 12 since that’s the value for Broadcast but that fails with:

The data you’ve seeded contained the following errors:

  • Invalid release group type: “12”.

Review the documentation on release editor seeding and make sure your data is formatted correctly.

But then I tried with

"Type": "broadcast"

and this time it worked! So I must’ve been doing something wrong last time!

However there is still a problem if I try add a secondary type, like “Live”. I’ve tried:

    type: 'broadcast',
    secondary_types: ['live'],

and then calling the MBImport:

let parameters = MBImport.buildFormParameters(release, edit_note);
let mbUI = $(`${MBImport.buildFormHTML(parameters)}${MBImport.buildSearchButton(release)}`).hide();

As done in other usescripts. When I submit the data, it shows up as:

The data you’ve seeded contained the following errors:

 Invalid release group type: “broadcast,live”.

Review the documentation on release editor seeding and make sure your data is formatted correctly.

Looking at MBImport, it definitely creates two separate form inputs for Type:

<input type="hidden" value="live" name="type">
<input type="hidden" value="broadcast" name="type">

But looks like in the seeder page they then become concatenated together. Has anyone else got this to work?

3 Likes

I strongly suspect this is an MBS bug introduced by the security improvements from November 2020 that no one has noticed yet as there usually is only a single release group type that gets seeded. Since I have an old seeder script that used to work with multiple types, I just checked again and now it indeed no longer works.

6 Likes

Thanks for checking and confirming @kellnerd!

1 Like