« get me outta code hell

thumbs, search: 'adorb' for search result thumbs - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-05-13 09:10:36 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-05-31 12:11:52 -0300
commitfa0b2b56ec1d69d4c74918ca587f572bb4a9e1d0 (patch)
tree0a69a9c09f2f4252d6d44beb4fc54ed61e58d655
parent1b399c2451b222597bf734dbf8a211e8b421fe07 (diff)
thumbs, search: 'adorb' for search result thumbs
-rw-r--r--src/gen-thumbs.js9
-rw-r--r--src/util/search-spec.js2
2 files changed, 9 insertions, 2 deletions
diff --git a/src/gen-thumbs.js b/src/gen-thumbs.js
index 1c34994f..d08726c7 100644
--- a/src/gen-thumbs.js
+++ b/src/gen-thumbs.js
@@ -91,7 +91,8 @@ const WARNING_DELAY_TIME = 10000;
 //   this particular thumbtack will be regenerated, but any others (whose
 //   `tackbust` listed below is equal or below the cache-recorded bust) will be
 //   reused. (Zero is a special value that means this tack's spec is still the
-//   same as it would've been generated prior to thumbtack versioning.)
+//   same as it would've been generated prior to thumbtack versioning; any new
+//   kinds of thumbnails should start counting up from one.)
 //
 // * `size` is the maximum length of the image. It will be scaled down,
 //   keeping aspect ratio, to fit in this dimension.
@@ -132,6 +133,12 @@ const thumbnailSpec = {
     quality: 85,
   },
 
+  'adorb': {
+    tackbust: 1,
+    size: 64,
+    quality: 90,
+  },
+
   'mini': {
     tackbust: 2,
     size: 8,
diff --git a/src/util/search-spec.js b/src/util/search-spec.js
index 6c8eb1ee..6c6ad221 100644
--- a/src/util/search-spec.js
+++ b/src/util/search-spec.js
@@ -56,7 +56,7 @@ function prepareArtwork(thing, {
   }
 
   const selectedSize =
-    getThumbnailEqualOrSmaller('small', mediaSrc);
+    getThumbnailEqualOrSmaller('adorb', mediaSrc);
 
   const mediaSrcJpeg =
     mediaSrc.replace(/\.(png|jpg)$/, `.${selectedSize}.jpg`);