From 6b20bde65171ae5ee60f4310349e21a677a0a986 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 22 Jul 2026 04:48:41 +0300 Subject: [PATCH] Fix renderGifs: correct path for Klipy file.hd/md/sm/xs nested structure --- index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index 45f3e59..586d38f 100644 --- a/index.html +++ b/index.html @@ -320,10 +320,10 @@ return; } gifGrid.innerHTML = results.map(gif => { - // Klipy format: file=hd, md=medium, sm=small, xs=tiny - const sizes = gif.file?.gif?.url ? gif.file : (gif.md || gif.sm || gif.xs || {}); - const thumbUrl = sizes?.gif?.url || gif.sm?.gif?.url || gif.xs?.gif?.url || ''; - const fullUrl = gif.file?.gif?.url || gif.md?.gif?.url || thumbUrl; + // Klipy format: file = { hd: {gif:{url,width,height}}, md: {...}, sm: {...}, xs: {...} } + const f = gif.file || {}; + const thumbUrl = f.sm?.gif?.url || f.xs?.gif?.url || f.md?.gif?.url || ''; + const fullUrl = f.hd?.gif?.url || f.md?.gif?.url || thumbUrl; return `gif`; }).join('');