« get me outta code hell

thumbs: new check-has-thumbs util, others throw for missing info - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/write
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-09-04 20:46:58 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-09-04 20:55:50 -0300
commit7069268db096ab0aa7a8839a3594efb2d1be8f86 (patch)
tree9ccb71a9a47cfdc14e39600b016a1b1614aa9e18 /src/write
parent75a7b56d3616d384b31757c9537a6e27f4e9b350 (diff)
thumbs: new check-has-thumbs util, others throw for missing info
Diffstat (limited to 'src/write')
-rw-r--r--src/write/bind-utilities.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/write/bind-utilities.js b/src/write/bind-utilities.js
index c32035f..942cce8 100644
--- a/src/write/bind-utilities.js
+++ b/src/write/bind-utilities.js
@@ -11,6 +11,7 @@ import {bindOpts} from '#sugar';
 import {thumb} from '#urls';
 
 import {
+  checkIfImagePathHasCachedThumbnails,
   getDimensionsOfImagePath,
   getThumbnailEqualOrSmaller,
   getThumbnailsAvailableForDimensions,
@@ -54,6 +55,10 @@ export function bindUtilities({
 
   bound.find = bindFind(wikiData, {mode: 'warn'});
 
+  bound.checkIfImagePathHasCachedThumbnails =
+    (imagePath) =>
+      checkIfImagePathHasCachedThumbnails(imagePath, thumbsCache);
+
   bound.getDimensionsOfImagePath =
     (imagePath) =>
       getDimensionsOfImagePath(imagePath, thumbsCache);