mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
improving th generation error handling
This commit is contained in:
parent
99b27a9a55
commit
7a322e2afa
@ -174,7 +174,7 @@ export class ThumbnailGeneratorMWs {
|
||||
await this.taskQue.execute(input);
|
||||
return next();
|
||||
} catch (error) {
|
||||
return next(new ErrorDTO(ErrorCodes.THUMBNAIL_GENERATION_ERROR, 'Error during generating thumbnail: ' + input.mediaPath, error));
|
||||
return next(new ErrorDTO(ErrorCodes.THUMBNAIL_GENERATION_ERROR, 'Error during generating thumbnail: ' + input.mediaPath, error.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,7 @@ export class VideoRendererFactory {
|
||||
|
||||
ffmpeg(input.mediaPath).ffprobe((err: any, data: FfprobeData) => {
|
||||
if (!!err || data === null) {
|
||||
return reject(err);
|
||||
return reject(err.toString());
|
||||
}
|
||||
const ratio = data.streams[0].height / data.streams[0].width;
|
||||
const command: FfmpegCommand = ffmpeg(input.mediaPath);
|
||||
@ -68,7 +68,7 @@ export class VideoRendererFactory {
|
||||
resolve();
|
||||
})
|
||||
.on('error', (e) => {
|
||||
reject(e);
|
||||
reject(e.toString());
|
||||
})
|
||||
.outputOptions(['-qscale:v 4']);
|
||||
if (input.makeSquare === false) {
|
||||
|
Loading…
Reference in New Issue
Block a user