diff options
author | Chocobozzz <me@florianbigard.com> | 2019-11-15 15:06:03 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-11-25 10:59:43 +0100 |
commit | d7a25329f9e607894d29ab342b9cb66638b56dc0 (patch) | |
tree | 6cd6bc4f2689f78944238b313c93427423a932ac /server/lib/thumbnail.ts | |
parent | 14981d7331da3f63fe6cfaf020ccb7c910006eaf (diff) | |
download | PeerTube-d7a25329f9e607894d29ab342b9cb66638b56dc0.tar.gz PeerTube-d7a25329f9e607894d29ab342b9cb66638b56dc0.tar.zst PeerTube-d7a25329f9e607894d29ab342b9cb66638b56dc0.zip |
Add ability to disable webtorrent
In favour of HLS
Diffstat (limited to 'server/lib/thumbnail.ts')
-rw-r--r-- | server/lib/thumbnail.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/lib/thumbnail.ts b/server/lib/thumbnail.ts index 84791955e..a99f71629 100644 --- a/server/lib/thumbnail.ts +++ b/server/lib/thumbnail.ts | |||
@@ -9,6 +9,7 @@ import { downloadImage } from '../helpers/requests' | |||
9 | import { MVideoPlaylistThumbnail } from '../typings/models/video/video-playlist' | 9 | import { MVideoPlaylistThumbnail } from '../typings/models/video/video-playlist' |
10 | import { MVideoFile, MVideoThumbnail } from '../typings/models' | 10 | import { MVideoFile, MVideoThumbnail } from '../typings/models' |
11 | import { MThumbnail } from '../typings/models/video/thumbnail' | 11 | import { MThumbnail } from '../typings/models/video/thumbnail' |
12 | import { getVideoFilePath } from './video-paths' | ||
12 | 13 | ||
13 | type ImageSize = { height: number, width: number } | 14 | type ImageSize = { height: number, width: number } |
14 | 15 | ||
@@ -55,7 +56,7 @@ function createVideoMiniatureFromExisting ( | |||
55 | } | 56 | } |
56 | 57 | ||
57 | function generateVideoMiniature (video: MVideoThumbnail, videoFile: MVideoFile, type: ThumbnailType) { | 58 | function generateVideoMiniature (video: MVideoThumbnail, videoFile: MVideoFile, type: ThumbnailType) { |
58 | const input = video.getVideoFilePath(videoFile) | 59 | const input = getVideoFilePath(video, videoFile) |
59 | 60 | ||
60 | const { filename, basePath, height, width, existingThumbnail, outputPath } = buildMetadataFromVideo(video, type) | 61 | const { filename, basePath, height, width, existingThumbnail, outputPath } = buildMetadataFromVideo(video, type) |
61 | const thumbnailCreator = videoFile.isAudio() | 62 | const thumbnailCreator = videoFile.isAudio() |