Skip to content

Commit

Permalink
Understand new release page RG link
Browse files Browse the repository at this point in the history
Now RG links from release pages still have the possible span.mp
but also always span.name-variation (which I think is a bug).

I move from (span)? to (span){0,2} instead of (span){1,2}
in case the span.name-variation bug is fixed in the future.
  • Loading branch information
jesus2099 committed Jan 10, 2020
1 parent c15b331 commit 95af17a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mb_MASS-MERGE-RECORDINGS.user.js
Expand Up @@ -2,7 +2,7 @@
var meta = function() {
// ==UserScript==
// @name mb. MASS MERGE RECORDINGS
// @version 2019.9.18
// @version 2020.1.10
// @description musicbrainz.org: Merges selected or all recordings from release A to release B
// @compatible vivaldi(2.4.1488.38)+violentmonkey my setup (office)
// @compatible vivaldi(1.0.435.46)+violentmonkey my setup (home, xp)
Expand Down Expand Up @@ -625,7 +625,7 @@ function loadReleasePage() {
for (var i5 = 0; i5 < recIDx5.length; i5 += 5) {
recIDs.push(recIDx5[i5].match(/id=([0-9]+)/)[1]);
}
remoteRelease["release-group"] = releaseWithoutARs.match(/\((?:<span[^>]*>)?<a href=".*\/release-group\/([^"]+)">(?:<bdi>)?[^<]+(?:<\/bdi>)?<\/a>(?:<\/span>)?\)/)[1];
remoteRelease["release-group"] = releaseWithoutARs.match(/\((?:<span[^>]*>){0,2}<a href=".*\/release-group\/([^"]+)">(?:<bdi>)?[^<]+(?:<\/bdi>)?<\/a>(?:<\/span>){0,2}\)/)[1];
remoteRelease.title = HTMLToText(rtitle[1]);
remoteRelease.looseTitle = looseTitle(remoteRelease.title);
remoteRelease.comment = releaseWithoutARs.match(/<h1>.+<span class="comment">\(<bdi>([^<]+)<\/bdi>\)<\/span><\/h1>/);
Expand Down

0 comments on commit 95af17a

Please sign in to comment.