diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-10-20 19:27:03 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-10-20 19:27:03 -0300 |
commit | b4097b4c12049814a8e350a469972bbe9addd8a6 (patch) | |
tree | da6c65f896fe5d21f1dc583649b3da52ede04ee9 /src | |
parent | 0b6c02093bd37851d4525f0bbf24bdbda5b8caf6 (diff) |
content: generateArtistCredit: fix mis-shown featuring annotation
Diffstat (limited to 'src')
-rw-r--r-- | src/content/dependencies/generateArtistCredit.js | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/content/dependencies/generateArtistCredit.js b/src/content/dependencies/generateArtistCredit.js index 196b5f32..72d55854 100644 --- a/src/content/dependencies/generateArtistCredit.js +++ b/src/content/dependencies/generateArtistCredit.js @@ -33,7 +33,10 @@ export default { const contextNormalContributions = contextContributions.filter(normalFilter); - query.normalContributionsAreDifferent = + // Note that the normal contributions will implicitly *always* + // "differ from context" if no context contributions are given, + // as in release info lines. + query.normalContributionsDifferFromContext = !compareArrays( query.normalContributions.map(({artist}) => artist), contextNormalContributions.map(({artist}) => artist), @@ -57,8 +60,8 @@ export default { }), data: (query, _creditContributions, _contextContributions) => ({ - normalContributionsAreDifferent: - query.normalContributionsAreDifferent, + normalContributionsDifferFromContext: + query.normalContributionsDifferFromContext, hasWikiEdits: !empty(query.wikiEditContributions), @@ -111,7 +114,7 @@ export default { for (const link of relations.featuringContributionLinks) { link.setSlots({ showAnnotation: - (slots.featuringStringKey + (slots.featuringStringKey || slots.normalFeaturingStringKey ? false : slots.showAnnotation), }); @@ -144,14 +147,14 @@ export default { ]); if (empty(relations.featuringContributionLinks)) { - if (data.normalContributionsAreDifferent) { + if (data.normalContributionsDifferFromContext) { return language.$(slots.normalStringKey, {artists: artistsList}); } else { return html.blank(); } } - if (data.normalContributionsAreDifferent && slots.normalFeaturingStringKey) { + if (data.normalContributionsDifferFromContext && slots.normalFeaturingStringKey) { return language.$(slots.normalFeaturingStringKey, { artists: artistsList, featuring: featuringList, |