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
+3 -3
View File
@@ -356,9 +356,9 @@ export class ScrapeStore {
pendingPreviews(limit = 5000, includeEmbeds = false): MediaRow[] {
const local =
"((source IS NULL OR source != 'embed') AND kind IN ('image', 'gif', 'video', 'audio'))";
const condition = includeEmbeds
? `(${local} OR (source = 'embed' AND preview_url IS NOT NULL))`
: local;
// With embeds on, a thumbnail-less embed still needs a pass: the engine resolves one
// from the provider or the page (or the Discord proxy for CDN attachment embeds).
const condition = includeEmbeds ? `(${local} OR source = 'embed')` : local;
return this.db
.prepare(