Resolve thumbnail-less embeds, including Discord CDN unfurls

This commit is contained in:
Fisto
2026-09-17 09:07:07 +02:00
parent c6a16a63f7
commit a7db9cb200
5 changed files with 87 additions and 5 deletions
+5 -1
View File
@@ -138,7 +138,11 @@ Previews run after every walk:
`pendingDownloads`.
- Embeds without a thumbnail in Discord's data (fxtwitter, vxReddit, ...) are resolved first:
provider oEmbed/fxtwitter API, then the page's `og:image`/`twitter:image` (512 KiB read cap,
10 s timeout, one attempt).
10 s timeout, one attempt). The page read never consumes media bytes: a non-HTML content type
stops it. An embed that unfurls a pasted Discord CDN attachment link resolves through the Discord
proxy instead, so it gets the same still (and video frame) as a plain attachment. Every
thumbnail-less embed enters preview passes; one with no resolvable image is closed as
`no preview source`.
- Animated GIF previews are stored as a static first frame (`ffmpeg`, 480px WebP); the original
animated GIF URL stays in `preview_url` for hover playback. Tenor embeds without a thumbnail are
resolved through Tenor's oEmbed. An animated GIF over the size cap is framed by ffmpeg reading