From 3a54605d4e7ec5b4f47131e8d23255be35b7beac Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 27 Jun 2022 11:53:12 +0200 Subject: Process images in a dedicated worker --- scripts/migrations/peertube-4.2.ts | 2 +- scripts/regenerate-thumbnails.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/migrations/peertube-4.2.ts b/scripts/migrations/peertube-4.2.ts index b5e5dfebd..6a9007265 100644 --- a/scripts/migrations/peertube-4.2.ts +++ b/scripts/migrations/peertube-4.2.ts @@ -110,7 +110,7 @@ async function generateSmallerAvatar (actor: MActorDefault) { const source = join(CONFIG.STORAGE.ACTOR_IMAGES, sourceFilename) const destination = join(CONFIG.STORAGE.ACTOR_IMAGES, newImageName) - await processImage(source, destination, imageSize, true) + await processImage({ path: source, destination, newSize: imageSize, keepOriginal: true }) const actorImageInfo = { name: newImageName, diff --git a/scripts/regenerate-thumbnails.ts b/scripts/regenerate-thumbnails.ts index a377baa61..061819387 100644 --- a/scripts/regenerate-thumbnails.ts +++ b/scripts/regenerate-thumbnails.ts @@ -52,7 +52,7 @@ async function processVideo (id: number) { thumbnail.height = size.height const thumbnailPath = thumbnail.getPath() - await processImage(previewPath, thumbnailPath, size, true) + await processImage({ path: previewPath, destination: thumbnailPath, newSize: size, keepOriginal: true }) // Save new attributes await thumbnail.save() -- cgit v1.2.3