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/yaml.js | |
parent | a2488d2f5f5d1b9ef096c2d9968c56e6439adcac (diff) |
data: Album.wallpaperParts
Diffstat (limited to 'src/data/yaml.js')
-rw-r--r-- | src/data/yaml.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/data/yaml.js b/src/data/yaml.js index 0bc2e298..64223662 100644 --- a/src/data/yaml.js +++ b/src/data/yaml.js @@ -479,6 +479,21 @@ export function parseSerieses(entries) { }); } +export function parseWallpaperParts(entries) { + return parseArrayEntries(entries, item => { + if (typeof item !== 'object') return item; + + return { + asset: + (item['Asset'] === 'none' + ? null + : item['Asset'] ?? null), + + style: item['Style'] ?? null, + }; + }); +} + export function parseDimensions(string) { // It's technically possible to pass an array like [30, 40] through here. // That's not really an issue because if it isn't of the appropriate shape, |