openvibers/openvibe.live Commits

Hero moments: use the screenshot endpoint for image-paste thumbnails

OP OpenVibers committed 18 Aug 2026 · d3d6d9653b · 1 file, +3 −1

/raw serves (empty) text content for screenshot pastes — the hero background
rotation rendered nothing.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Xw6Sf5zzSALw8m93XNu5JE

Changes

ddiff --git a/server/ai/ai-moments-job.js b/server/ai/ai-moments-job.js
iindex 019a259c..f91b354c 100644
---- a/server/ai/ai-moments-job.js
++++ b/server/ai/ai-moments-job.js
@@@ -404,7 +404,9 @@ async function tick(opts = {}) {
});
if (paste) {
pasteSlug = paste.slug || slug;
-- img = media.publicUrl(paste.screenshot_url) || media.pasteRawUrl(pasteSlug);
++ // Screenshot pastes must use the image endpoint — /raw serves the
++ // (empty) text content and broke the hero background rotation.
++ img = media.publicUrl(paste.screenshot_url) || `${media.pasteUrl(pasteSlug)}/screenshot`;
}
} catch (e) { console.warn(`[AI-Moments] paste post failed for VOD ${v.vod_id}:`, e.message); }
try { fs.unlinkSync(screenshotPath); } catch { /* tmp frame */ }