From 266707202c2ffcb8a1b7649ec29106dd444f4a77 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 27 Feb 2018 11:29:24 +0100 Subject: Keep ratio for thumbnails --- server/models/video/video.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'server/models/video') diff --git a/server/models/video/video.ts b/server/models/video/video.ts index 839b81a8b..4e065e377 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts @@ -793,24 +793,20 @@ export class VideoModel extends Model { } createPreview (videoFile: VideoFileModel) { - const imageSize = PREVIEWS_SIZE.width + 'x' + PREVIEWS_SIZE.height - return generateImageFromVideoFile( this.getVideoFilePath(videoFile), CONFIG.STORAGE.PREVIEWS_DIR, this.getPreviewName(), - imageSize + PREVIEWS_SIZE ) } createThumbnail (videoFile: VideoFileModel) { - const imageSize = THUMBNAILS_SIZE.width + 'x' + THUMBNAILS_SIZE.height - return generateImageFromVideoFile( this.getVideoFilePath(videoFile), CONFIG.STORAGE.THUMBNAILS_DIR, this.getThumbnailName(), - imageSize + THUMBNAILS_SIZE ) } -- cgit v1.2.3