From 3a5b49cf3a10702c0dae1190c9baabd8a2c2ef3b Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Wed, 12 Apr 2023 13:20:32 -0300 Subject: content: stub track page, misc. other changes * generateContributionLinks replaced with linkContribution, tests still need updating * album pages respect albums without cover art * track pages without unique art inherit art tags from album (fixes #13) not heavily tested, this commit probably breaks some pages which were loading correctly before --- src/content/dependencies/generateAlbumTrackListItem.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/content/dependencies/generateAlbumTrackListItem.js') diff --git a/src/content/dependencies/generateAlbumTrackListItem.js b/src/content/dependencies/generateAlbumTrackListItem.js index dd41ba11..fe46153d 100644 --- a/src/content/dependencies/generateAlbumTrackListItem.js +++ b/src/content/dependencies/generateAlbumTrackListItem.js @@ -2,7 +2,7 @@ import {compareArrays} from '../../util/sugar.js'; export default { contentDependencies: [ - 'generateContributionLinks', + 'linkContribution', 'linkTrack', ], @@ -16,10 +16,11 @@ export default { const relations = {}; relations.contributionLinks = - relation('generateContributionLinks', track.artistContribs, { - showContribution: false, - showIcons: false, - }); + track.artistContribs.map(({who, what}) => + relation('linkContribution', who, what, { + showContribution: false, + showIcons: false, + })); relations.trackLink = relation('linkTrack', track); @@ -67,7 +68,7 @@ export default { by: html.tag('span', {class: 'by'}, language.$('trackList.item.withArtists.by', { - artists: relations.contributionLinks, + artists: language.formatConjunctionList(relations.contributionLinks), })), }))); }, -- cgit 1.3.0-6-gf8a5