diff options
author | Chocobozzz <me@florianbigard.com> | 2023-06-19 09:56:12 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-06-29 10:19:54 +0200 |
commit | 53d4db2a8a11407165da6525cad3198439686d36 (patch) | |
tree | bcdacea812eb741eb25916a137d6f9d1bcc7704c /server/lib/files-cache/shared | |
parent | 109d4a7f017e5ba18045f308158a71399a1b08cd (diff) | |
download | PeerTube-53d4db2a8a11407165da6525cad3198439686d36.tar.gz PeerTube-53d4db2a8a11407165da6525cad3198439686d36.tar.zst PeerTube-53d4db2a8a11407165da6525cad3198439686d36.zip |
Fix playlist thumbnail generation
Diffstat (limited to 'server/lib/files-cache/shared')
-rw-r--r-- | server/lib/files-cache/shared/abstract-permanent-file-cache.ts | 6 |
1 files changed, 4 insertions, 2 deletions
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 <M extends ImageModel> { | |||
66 | }) | 66 | }) |
67 | } | 67 | } |
68 | 68 | ||
69 | private async downloadRemoteFile (image: M) { | 69 | async downloadRemoteFile (image: M) { |
70 | logger.info('Download remote image %s lazily.', image.fileUrl) | 70 | logger.info('Download remote image %s lazily.', image.fileUrl) |
71 | 71 | ||
72 | await this.downloadImage({ | 72 | const destination = await this.downloadImage({ |
73 | filename: image.filename, | 73 | filename: image.filename, |
74 | fileUrl: image.fileUrl, | 74 | fileUrl: image.fileUrl, |
75 | size: this.getImageSize(image) | 75 | size: this.getImageSize(image) |
@@ -78,6 +78,8 @@ export abstract class AbstractPermanentFileCache <M extends ImageModel> { | |||
78 | image.onDisk = true | 78 | image.onDisk = true |
79 | image.save() | 79 | image.save() |
80 | .catch(err => logger.error('Cannot save new image disk state.', { err })) | 80 | .catch(err => logger.error('Cannot save new image disk state.', { err })) |
81 | |||
82 | return destination | ||
81 | } | 83 | } |
82 | 84 | ||
83 | private onServeError (options: { | 85 | private onServeError (options: { |