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/yaml.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/data/yaml.js') 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, -- cgit 1.3.0-6-gf8a5