From 164174a6abac3e391e95d479a98749e20eb86f34 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 17 Oct 2017 10:35:27 +0200 Subject: Use preview instead of thumbnail for oembed --- server/models/video/video.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'server/models/video') diff --git a/server/models/video/video.ts b/server/models/video/video.ts index 0d0048b4a..fb18a485a 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts @@ -48,6 +48,7 @@ import { VideoMethods } from './video-interface' +import { PREVIEWS_SIZE } from '../../initializers/constants' let Video: Sequelize.Model let getOriginalFile: VideoMethods.GetOriginalFile @@ -373,10 +374,13 @@ isOwned = function (this: VideoInstance) { } createPreview = function (this: VideoInstance, videoFile: VideoFileInstance) { + const imageSize = PREVIEWS_SIZE.width + 'x' + PREVIEWS_SIZE.height + return generateImageFromVideoFile( this.getVideoFilePath(videoFile), CONFIG.STORAGE.PREVIEWS_DIR, - this.getPreviewName() + this.getPreviewName(), + imageSize ) } -- cgit v1.2.3