X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Fthumbnail.ts;h=aa2d7a8132923a77e0b0a1eaa9f34c0d861e0c3e;hb=68d6e57870dd5ea87a03d13adcfcc72786d8348a;hp=d2384f53cf1087f3d4e0b26afa8edbb33ee9f865;hpb=0305db28c98fd6cf43a3c50ba92c76215e99d512;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/thumbnail.ts b/server/lib/thumbnail.ts index d2384f53c..aa2d7a813 100644 --- a/server/lib/thumbnail.ts +++ b/server/lib/thumbnail.ts @@ -1,7 +1,6 @@ import { join } from 'path' -import { ThumbnailType } from '../../shared/models/videos/thumbnail.type' -import { generateImageFromVideoFile } from '../helpers/ffmpeg-utils' -import { generateImageFilename, processImage } from '../helpers/image-utils' +import { ThumbnailType } from '@shared/models' +import { generateImageFilename, generateImageFromVideoFile, processImage } from '../helpers/image-utils' import { downloadImage } from '../helpers/requests' import { CONFIG } from '../initializers/config' import { ASSETS_PATH, PREVIEWS_SIZE, THUMBNAILS_SIZE } from '../initializers/constants' @@ -115,7 +114,7 @@ function generateVideoMiniature (options: { }) { const { video, videoFile, type } = options - return VideoPathManager.Instance.makeAvailableVideoFile(video, videoFile, input => { + return VideoPathManager.Instance.makeAvailableVideoFile(videoFile.withVideoOrPlaylist(video), input => { const { filename, basePath, height, width, existingThumbnail, outputPath } = buildMetadataFromVideo(video, type) const thumbnailCreator = videoFile.isAudio()