From 53d4db2a8a11407165da6525cad3198439686d36 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 19 Jun 2023 09:56:12 +0200 Subject: Fix playlist thumbnail generation --- server/lib/files-cache/shared/abstract-permanent-file-cache.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'server/lib/files-cache/shared') diff --git a/server/lib/files-cache/shared/abstract-permanent-file-cache.ts b/server/lib/files-cache/shared/abstract-permanent-file-cache.ts index 22596c3eb..297461035 100644 --- a/server/lib/files-cache/shared/abstract-permanent-file-cache.ts +++ b/server/lib/files-cache/shared/abstract-permanent-file-cache.ts @@ -66,10 +66,10 @@ export abstract class AbstractPermanentFileCache { }) } - private async downloadRemoteFile (image: M) { + async downloadRemoteFile (image: M) { logger.info('Download remote image %s lazily.', image.fileUrl) - await this.downloadImage({ + const destination = await this.downloadImage({ filename: image.filename, fileUrl: image.fileUrl, size: this.getImageSize(image) @@ -78,6 +78,8 @@ export abstract class AbstractPermanentFileCache { image.onDisk = true image.save() .catch(err => logger.error('Cannot save new image disk state.', { err })) + + return destination } private onServeError (options: { -- cgit v1.2.3