do not create thumbnail task if the item already has a thumbnail

This commit is contained in:
Hongbo Wu 2024-01-18 14:52:20 +08:00
parent 5136874372
commit 8a3b50f07f

View file

@ -168,8 +168,8 @@ export const savePage = async (
)
}
// we don't want to create thumbnail for imported pages
if (!isImported) {
// we don't want to create thumbnail for imported pages and pages that already have thumbnail
if (!isImported && !parseResult.parsedContent?.previewImage) {
try {
// create a task to update thumbnail and pre-cache all images
const taskId = await enqueueThumbnailTask(user.id, slug)