From 0eae2b96ba55b18d06c25132f0e0e1ebe1a71a6f Mon Sep 17 00:00:00 2001 From: David Kellner <52860029+kellnerd@users.noreply.github.com> Date: Thu, 9 Nov 2023 19:25:01 +0100 Subject: [PATCH] discogs_importer: Restore more links to MB which went missing - Support release artist on (master) release pages again - Handle dynamically expanded credits section on master release pages - Display series MB search links with an "S?" mark --- discogs_importer.user.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/discogs_importer.user.js b/discogs_importer.user.js index 478c005..93f7d67 100644 --- a/discogs_importer.user.js +++ b/discogs_importer.user.js @@ -131,6 +131,7 @@ function insertMBLinks(current_page_key) { 'release-group': { mark: 'G' }, place: { mark: 'P' }, label: { mark: 'L' }, + series: { mark: 'S' }, }; let mark = ''; let entity_name = 'entity'; @@ -261,13 +262,19 @@ function insertMBLinks(current_page_key) { // dynamically expanded master release setInterval(() => add_mblinks($root, 'tr.sub.release', ['artist', 'release']), 1000); } else if (current_page_info.type === 'master') { - // credits section (master release summary) - add_mblinks($root, '#Credits', ['artist']); - // dynamically paged and filterable release listing - setInterval(() => add_mblinks($root, '#versions tr[class^=row_]', ['label', 'release']), 1000); + // master release artist + add_mblinks($root, 'h1', ['artist']); + setInterval(() => { + // dynamically expanded credits section (master release summary) + add_mblinks($root, '#Credits li[class^=artist_]', ['artist']); + // dynamically paged and filterable release listing + add_mblinks($root, '#versions tr[class^=row_]', ['label', 'release']); + }, 1000); } else if (current_page_info.type === 'release') { - // master release in the actions sidebar + // master release in the actions sidebar (link early to prevent duplicate release groups on import!) add_mblinks($root, '#release-actions', ['master']); + // release artist + add_mblinks($root, 'h1', ['artist']); // release labels and series add_mblinks($root, 'div[class^=info_]', [['label', 'series'], 'label']); add_mblinks($root, '#release-companies', [['label', 'place'], 'label']);