diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2025-01-06 19:41:24 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2025-01-06 19:42:00 -0400 |
commit | 405ccfd6c813398fc0e919caeff922bc1c3d9dd0 (patch) | |
tree | 8e6b8ea8d253da8690d1ecdd28a2d09163f59587 /src/data/things/album.js | |
parent | a2488d2f5f5d1b9ef096c2d9968c56e6439adcac (diff) |
data: Album.wallpaperParts
Diffstat (limited to 'src/data/things/album.js')
-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] = ({ |