Resolve external embed previews and keep their real MIME types

This commit is contained in:
Fisto
2026-09-16 12:52:44 +02:00
parent 7fa6118b6f
commit 1b5fcfed2f
11 changed files with 313 additions and 41 deletions
+3 -2
View File
@@ -394,9 +394,10 @@ export class MediaService {
const item = this.getMediaItem(scrapeId, itemId);
if (!item?.preview_hash) return null;
const extension = item.preview_ext ?? "webp";
return {
path: join(this.rootDir, scrapeId, "thumbs", `${item.preview_hash}.webp`),
contentType: "image/webp"
path: join(this.rootDir, scrapeId, "thumbs", `${item.preview_hash}.${extension}`),
contentType: FILE_CONTENT_TYPES[extension] ?? "application/octet-stream"
};
}