From 6c5e2cbe3127e0f55c75096fe7e09cf40de2b9a9 Mon Sep 17 00:00:00 2001 From: chaban <225617645+chaban-mb@users.noreply.github.com> Date: Wed, 17 Jun 2026 19:30:18 +0200 Subject: [PATCH] fix: namespace label cache key on discography pages to prevent artist MBID collision On discography/band pages, the label lookup used the bare URL as the cache key (e.g. 'https://example.bandcamp.com'). This is the same key the artist lookup uses. When a label was found, its MBID was cached under the bare URL. On subsequent album page visits, resolveMBID(root_url) would find that label MBID and incorrectly seed it as the release artist credit, causing MusicBrainz to reject the import with 'Invalid artist_credit.names.0.mbid'. The fix adds a 'label:' prefix to the cache key, matching the pattern already used on album pages (line 610). Closes murdos/musicbrainz-userscripts#795 --- bandcamp_importer.user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bandcamp_importer.user.js b/bandcamp_importer.user.js index b598f1b..2572245 100644 --- a/bandcamp_importer.user.js +++ b/bandcamp_importer.user.js @@ -778,7 +778,7 @@ function init() { }; mblinks.searchAndDisplayMbLink(cleanURL, 'artist', insertLinkCb, undefined, onSearchComplete); - mblinks.searchAndDisplayMbLink(cleanURL, 'label', insertLinkCb, undefined, onSearchComplete); + mblinks.searchAndDisplayMbLink(cleanURL, 'label', insertLinkCb, `label:${cleanURL}`, onSearchComplete); } }