Cache preview frames for Discord video attachments

This commit is contained in:
Fisto
2026-09-16 23:40:46 +02:00
parent 3da0da0ca7
commit caf9b7db3a
6 changed files with 34 additions and 13 deletions
+5 -2
View File
@@ -117,8 +117,11 @@ Downloads run after a finished walk when the scrape used `mode: "download"`:
Previews run after every walk:
- In both modes, Discord-hosted image and GIF URLs (`cdn.discordapp.com`, `media.discordapp.net`)
are transformed to the CDN resizer (`media.discordapp.net?...width=320&height=320&format=webp`).
- In both modes, Discord-hosted image, GIF, and **video** URLs (`cdn.discordapp.com`,
`media.discordapp.net`) are transformed to the CDN resizer
(`media.discordapp.net?...width=320&height=320&format=webp`). The proxy renders a frame for
video files, so attachment mp4/webm get a cached poster in links mode without downloading the
file. Download mode additionally keeps an ffmpeg poster.
- In both modes, embed rows also get their stored `preview_url` (YouTube, X, TikTok thumbnails,
and so on) cached. The embed's full media URL is never fetched; embed rows are excluded from
`pendingDownloads`.