« get me outta code hell

data: roll paired "byRef" and "dynamic" properties into one - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/gen-thumbs.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-09-07 17:30:54 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-09-07 17:30:54 -0300
commitbbccaf51222cb4bed73466164496f5bc1030292c (patch)
treefc26c89f44b84140ba01b9edabedef10c73a637a /src/gen-thumbs.js
parentc18844784bd1c0ead7c49d0519727b7a92e23e13 (diff)
data: roll paired "byRef" and "dynamic" properties into one
Diffstat (limited to 'src/gen-thumbs.js')
-rw-r--r--src/gen-thumbs.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gen-thumbs.js b/src/gen-thumbs.js
index fafd17f6..4977ade7 100644
--- a/src/gen-thumbs.js
+++ b/src/gen-thumbs.js
@@ -93,6 +93,9 @@ import * as path from 'node:path';
 
 import dimensionsOf from 'image-size';
 
+import {delay, empty, queue} from '#sugar';
+import {CacheableObject} from '#things';
+
 import {
   colors,
   fileIssue,
@@ -110,8 +113,6 @@ import {
   traverse,
 } from '#node-utils';
 
-import {delay, empty, queue} from '#sugar';
-
 export const defaultMagickThreads = 8;
 
 export function getThumbnailsAvailableForDimensions([width, height]) {
@@ -608,8 +609,8 @@ export function getExpectedImagePaths(mediaPath, {urls, wikiData}) {
     wikiData.albumData
       .flatMap(album => [
         album.hasCoverArt && fromRoot.to('media.albumCover', album.directory, album.coverArtFileExtension),
-        !empty(album.bannerArtistContribsByRef) && fromRoot.to('media.albumBanner', album.directory, album.bannerFileExtension),
-        !empty(album.wallpaperArtistContribsByRef) && fromRoot.to('media.albumWallpaper', album.directory, album.wallpaperFileExtension),
+        !empty(CacheableObject.getUpdateValue(album, 'bannerArtistContribs')) && fromRoot.to('media.albumBanner', album.directory, album.bannerFileExtension),
+        !empty(CacheableObject.getUpdateValue(album, 'wallpaperArtistContribs')) && fromRoot.to('media.albumWallpaper', album.directory, album.wallpaperFileExtension),
       ])
       .filter(Boolean),