From 405ccfd6c813398fc0e919caeff922bc1c3d9dd0 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Mon, 6 Jan 2025 19:41:24 -0400 Subject: data: Album.wallpaperParts --- src/data/things/album.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/data/things') diff --git a/src/data/things/album.js b/src/data/things/album.js index af3c6a92..bd54a356 100644 --- a/src/data/things/album.js +++ b/src/data/things/album.js @@ -20,6 +20,7 @@ import { parseContributors, parseDate, parseDimensions, + parseWallpaperParts, } from '#yaml'; import {exitWithoutDependency, exposeDependency, exposeUpdateValueOrContinue} @@ -56,6 +57,7 @@ import { thing, thingList, urls, + wallpaperParts, wikiData, } from '#composite/wiki-properties'; @@ -143,6 +145,11 @@ export class Album extends Thing { simpleString(), ], + wallpaperParts: [ + exitWithoutContribs({contribs: 'wallpaperArtistContribs'}), + wallpaperParts(), + ], + bannerStyle: [ exitWithoutContribs({contribs: 'bannerArtistContribs'}), simpleString(), @@ -440,6 +447,11 @@ export class Album extends Thing { 'Wallpaper Style': {property: 'wallpaperStyle'}, 'Wallpaper File Extension': {property: 'wallpaperFileExtension'}, + 'Wallpaper Parts': { + property: 'wallpaperParts', + transform: parseWallpaperParts, + }, + 'Banner Artists': { property: 'bannerArtistContribs', transform: parseContributors, @@ -488,6 +500,18 @@ export class Album extends Thing { 'Review Points': {ignore: true}, }, + + invalidFieldCombinations: [ + {message: `Specify one wallpaper style or multiple wallpaper parts, not both`, fields: [ + 'Wallpaper Parts', + 'Wallpaper Style', + ]}, + + {message: `Wallpaper file extensions are specified on asset, per part`, fields: [ + 'Wallpaper Parts', + 'Wallpaper File Extension', + ]}, + ], }; static [Thing.getYamlLoadingSpec] = ({ -- cgit 1.3.0-6-gf8a5