aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models
diff options
context:
space:
mode:
Diffstat (limited to 'server/models')
-rw-r--r--server/models/video/video.ts6
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'
51import { PREVIEWS_SIZE } from '../../initializers/constants'
51 52
52let Video: Sequelize.Model<VideoInstance, VideoAttributes> 53let Video: Sequelize.Model<VideoInstance, VideoAttributes>
53let getOriginalFile: VideoMethods.GetOriginalFile 54let getOriginalFile: VideoMethods.GetOriginalFile
@@ -373,10 +374,13 @@ isOwned = function (this: VideoInstance) {
373} 374}
374 375
375createPreview = function (this: VideoInstance, videoFile: VideoFileInstance) { 376createPreview = 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