Closed derat closed 2 years ago
https://musicbrainz.org/release/<mbid>/add-cover-art
skips a click on the "Add Cover Art" button, but it seems like I may still need a redirector.
Here's the relevant redirection code from root/static/scripts/release-editor/edits.js
:
if (!current) {
// We're done!
// Don't ask for confirmation before redirecting.
root.redirecting = true;
if (releaseEditor.redirectURI) {
var a = document.createElement('a');
a.href = releaseEditor.redirectURI;
a.search += /^\?/.test(a.search) ? '&' : '?';
a.search += 'release_mbid=' + release.gid();
window.location.href = a.href;
} else {
window.location.pathname = '/release/' + release.gid();
}
return;
}
I wonder if I can do something disgusting using a javascript:
URL...
It is possible to do something disgusting with a javascript:
URL, but it's disgusting enough that I reported it as a bug: https://tickets.metabrainz.org/browse/MBS-12719
So I'm just going to go the redirector route instead.
It'd be nice if there were some way to seed cover art edits instead of just opening the image in a tab.
https://wiki.musicbrainz.org/Development/Release_Editor_Seeding describes a
redirect_uri
parameter:Failing any other options, maybe I could find a way to make the seeded release edit redirect to
https://musicbrainz.org/release/<release_mbid>/cover-art
after it's submitted. Adding a redirector that looks at therelease_mbid
parameter to redirect to the MB URL feels pretty gross, though. :-/