1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 10:19:35 +02:00

Fix playlist thumbnail generation

This commit is contained in:
Chocobozzz 2023-06-19 09:56:12 +02:00
parent 109d4a7f01
commit 53d4db2a8a
No known key found for this signature in database
GPG key ID: 583A612D890159BE
7 changed files with 25 additions and 19 deletions

View file

@ -66,10 +66,10 @@ export abstract class AbstractPermanentFileCache <M extends ImageModel> {
})
}
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 <M extends ImageModel> {
image.onDisk = true
image.save()
.catch(err => logger.error('Cannot save new image disk state.', { err }))
return destination
}
private onServeError (options: {