From db0fd78ca60fc695f87d1f3adf53967bdae2796f Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Wed, 13 Nov 2024 17:43:16 -0400 Subject: data: stub Referenced {Track,Album} Artworks fields just ordinary reference lists, not used anywhere on website yet --- src/data/checks.js | 4 ++++ src/data/things/album.js | 29 +++++++++++++++++++++++++++++ src/data/things/track.js | 27 +++++++++++++++++++++++++++ 3 files changed, 60 insertions(+) (limited to 'src/data') diff --git a/src/data/checks.js b/src/data/checks.js index 4dc1e1d0..da7b228c 100644 --- a/src/data/checks.js +++ b/src/data/checks.js @@ -183,6 +183,8 @@ export function filterReferenceErrors(wikiData, { bannerArtistContribs: '_contrib', groups: 'group', artTags: '_artTag', + referencedTrackArtworks: 'track', + referencedAlbumArtworks: 'album', commentary: '_commentary', }], @@ -219,6 +221,8 @@ export function filterReferenceErrors(wikiData, { referencedTracks: '_trackNotRerelease', sampledTracks: '_trackNotRerelease', artTags: '_artTag', + referencedTrackArtworks: 'track', + referencedAlbumArtworks: 'album', originalReleaseTrack: '_trackNotRerelease', commentary: '_commentary', }], diff --git a/src/data/things/album.js b/src/data/things/album.js index e17304d0..539f4fb1 100644 --- a/src/data/things/album.js +++ b/src/data/things/album.js @@ -217,6 +217,32 @@ export class Album extends Thing { }), ], + referencedTrackArtworks: [ + exitWithoutContribs({ + contribs: 'coverArtistContribs', + value: input.value([]), + }), + + referenceList({ + class: input.value(Track), + find: input.value(find.track), + data: 'trackData', + }), + ], + + referencedAlbumArtworks: [ + exitWithoutContribs({ + contribs: 'coverArtistContribs', + value: input.value([]), + }), + + referenceList({ + class: input.value(Album), + find: input.value(find.album), + data: 'albumData', + }), + ], + // Update only artistData: wikiData({ @@ -384,6 +410,9 @@ export class Album extends Thing { transform: parseAdditionalFiles, }, + 'Referenced Track Artworks': {property: 'referencedTrackArtworks'}, + 'Referenced Album Artworks': {property: 'referencedAlbumArtworks'}, + 'Franchises': {ignore: true}, 'Artists': { diff --git a/src/data/things/track.js b/src/data/things/track.js index e3526f1c..586e5f4c 100644 --- a/src/data/things/track.js +++ b/src/data/things/track.js @@ -319,6 +319,30 @@ export class Track extends Thing { }), ], + referencedTrackArtworks: [ + exitWithoutUniqueCoverArt({ + value: input.value([]), + }), + + referenceList({ + class: input.value(Track), + find: input.value(find.track), + data: 'trackData', + }), + ], + + referencedAlbumArtworks: [ + exitWithoutUniqueCoverArt({ + value: input.value([]), + }), + + referenceList({ + class: input.value(Album), + find: input.value(find.album), + data: 'albumData', + }), + ], + // Update only albumData: wikiData({ @@ -482,6 +506,9 @@ export class Track extends Thing { 'Referenced Tracks': {property: 'referencedTracks'}, 'Sampled Tracks': {property: 'sampledTracks'}, + 'Referenced Track Artworks': {property: 'referencedTrackArtworks'}, + 'Referenced Album Artworks': {property: 'referencedAlbumArtworks'}, + 'Franchises': {ignore: true}, 'Inherit Franchises': {ignore: true}, -- cgit 1.3.0-6-gf8a5