Cache audio waveforms and rescue oversized GIF previews

This commit is contained in:
Fisto
2026-09-16 23:48:17 +02:00
parent caf9b7db3a
commit 8f30ec14ad
7 changed files with 123 additions and 5 deletions
+6
View File
@@ -40,6 +40,12 @@ mobile draft at 390px.
- [x] C11 preview caching: Discord-hosted image/GIF previews (WebP 320px, hash-addressed, 5 MiB
cap, one attempt) run after every walk in both modes. Live run `...-20260916090722`:
`previewed: 2`; thumbs served over `/api/media/<scrape>/<item>/thumb` (200).
- [x] C30 Preview completeness. Audio attachments and voice messages get an ffmpeg waveform
strip; oversized animated GIFs fall back to an ffmpeg-read first frame instead of `too large`;
transient network failures stay pending for the next backfill instead of becoming permanent.
Live: a scrape with 58 audio items backfilled 13 waveforms in 40 s, serving `image/webp`.
Remaining non-cached: Lottie stickers/custom emoji (not indexed as media) and embeds whose
pages refuse bots (marked PRIVATE/GONE by their 403/404).
- [x] C29 Attachment video previews. Discord's image proxy renders a frame for video files
(`?width=320&height=320&format=webp`), so `previewUrlFor` now resizes attachment mp4/webm in
links mode too and `pendingPreviews` includes non-embed videos. Live: paused-scrape videos