]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/thumbnail.ts
Optimize local sql query
[github/Chocobozzz/PeerTube.git] / server / lib / thumbnail.ts
index 84791955e0cc00c908b9882dae22377b93dd9188..a99f716290accecf0dc89fd038966cdd8323a7c9 100644 (file)
@@ -9,6 +9,7 @@ import { downloadImage } from '../helpers/requests'
 import { MVideoPlaylistThumbnail } from '../typings/models/video/video-playlist'
 import { MVideoFile, MVideoThumbnail } from '../typings/models'
 import { MThumbnail } from '../typings/models/video/thumbnail'
+import { getVideoFilePath } from './video-paths'
 
 type ImageSize = { height: number, width: number }
 
@@ -55,7 +56,7 @@ function createVideoMiniatureFromExisting (
 }
 
 function generateVideoMiniature (video: MVideoThumbnail, videoFile: MVideoFile, type: ThumbnailType) {
-  const input = video.getVideoFilePath(videoFile)
+  const input = getVideoFilePath(video, videoFile)
 
   const { filename, basePath, height, width, existingThumbnail, outputPath } = buildMetadataFromVideo(video, type)
   const thumbnailCreator = videoFile.isAudio()