diff options
Diffstat (limited to 'server/models')
-rw-r--r-- | server/models/video/video.ts | 6 |
1 files changed, 5 insertions, 1 deletions
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 { | |||
48 | 48 | ||
49 | VideoMethods | 49 | VideoMethods |
50 | } from './video-interface' | 50 | } from './video-interface' |
51 | import { PREVIEWS_SIZE } from '../../initializers/constants' | ||
51 | 52 | ||
52 | let Video: Sequelize.Model<VideoInstance, VideoAttributes> | 53 | let Video: Sequelize.Model<VideoInstance, VideoAttributes> |
53 | let getOriginalFile: VideoMethods.GetOriginalFile | 54 | let getOriginalFile: VideoMethods.GetOriginalFile |
@@ -373,10 +374,13 @@ isOwned = function (this: VideoInstance) { | |||
373 | } | 374 | } |
374 | 375 | ||
375 | createPreview = function (this: VideoInstance, videoFile: VideoFileInstance) { | 376 | createPreview = function (this: VideoInstance, videoFile: VideoFileInstance) { |
377 | const imageSize = PREVIEWS_SIZE.width + 'x' + PREVIEWS_SIZE.height | ||
378 | |||
376 | return generateImageFromVideoFile( | 379 | return generateImageFromVideoFile( |
377 | this.getVideoFilePath(videoFile), | 380 | this.getVideoFilePath(videoFile), |
378 | CONFIG.STORAGE.PREVIEWS_DIR, | 381 | CONFIG.STORAGE.PREVIEWS_DIR, |
379 | this.getPreviewName() | 382 | this.getPreviewName(), |
383 | imageSize | ||
380 | ) | 384 | ) |
381 | } | 385 | } |
382 | 386 | ||