diff options
Diffstat (limited to 'src/data/things')
-rw-r--r-- | src/data/things/album.js | 24 |
1 files changed, 24 insertions, 0 deletions
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] = ({ |