aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-02-27 11:29:24 +0100
committerChocobozzz <me@florianbigard.com>2018-02-27 11:29:24 +0100
commit266707202c2ffcb8a1b7649ec29106dd444f4a77 (patch)
treef2d83c39d90ad80fb13fa04931a055beed63ca8c /server/models
parentea99d15fe87d03568f4b5077e1ce37c742c9fa33 (diff)
downloadPeerTube-266707202c2ffcb8a1b7649ec29106dd444f4a77.tar.gz
PeerTube-266707202c2ffcb8a1b7649ec29106dd444f4a77.tar.zst
PeerTube-266707202c2ffcb8a1b7649ec29106dd444f4a77.zip
Keep ratio for thumbnails
Diffstat (limited to 'server/models')
-rw-r--r--server/models/video/video.ts8
1 files changed, 2 insertions, 6 deletions
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<VideoModel> {
793 } 793 }
794 794
795 createPreview (videoFile: VideoFileModel) { 795 createPreview (videoFile: VideoFileModel) {
796 const imageSize = PREVIEWS_SIZE.width + 'x' + PREVIEWS_SIZE.height
797
798 return generateImageFromVideoFile( 796 return generateImageFromVideoFile(
799 this.getVideoFilePath(videoFile), 797 this.getVideoFilePath(videoFile),
800 CONFIG.STORAGE.PREVIEWS_DIR, 798 CONFIG.STORAGE.PREVIEWS_DIR,
801 this.getPreviewName(), 799 this.getPreviewName(),
802 imageSize 800 PREVIEWS_SIZE
803 ) 801 )
804 } 802 }
805 803
806 createThumbnail (videoFile: VideoFileModel) { 804 createThumbnail (videoFile: VideoFileModel) {
807 const imageSize = THUMBNAILS_SIZE.width + 'x' + THUMBNAILS_SIZE.height
808
809 return generateImageFromVideoFile( 805 return generateImageFromVideoFile(
810 this.getVideoFilePath(videoFile), 806 this.getVideoFilePath(videoFile),
811 CONFIG.STORAGE.THUMBNAILS_DIR, 807 CONFIG.STORAGE.THUMBNAILS_DIR,
812 this.getThumbnailName(), 808 this.getThumbnailName(),
813 imageSize 809 THUMBNAILS_SIZE
814 ) 810 )
815 } 811 }
816 812