feat: 优先使用 thumbUrl 作为 PDF 封面大图

This commit is contained in:
TerryM
2026-05-29 17:42:37 +08:00
parent 54bdbbc0e9
commit db5da8a841
2 changed files with 2 additions and 1 deletions

View File

@@ -30,6 +30,7 @@ export type Attachment = {
height?: number;
durationSec?: number;
posterUrl?: string;
thumbUrl?: string;
thumbnailUrl?: string;
};

View File

@@ -26,7 +26,7 @@ function coverFor(att: Attachment | undefined) {
if (att.kind === "image" || att.mime.startsWith("image/")) {
return att.thumbnailUrl || att.url;
}
return att.posterUrl || att.thumbnailUrl || "";
return att.posterUrl || att.thumbUrl || att.thumbnailUrl || "";
}
export function postToResource(