aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/video-pre-import.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-06-06 15:59:51 +0200
committerChocobozzz <me@florianbigard.com>2023-06-29 10:19:33 +0200
commitf162d32da098aa55f6de2367142faa166edb7c08 (patch)
tree31c6a96972994171853cb6c4e0b88b63241f8979 /server/lib/video-pre-import.ts
parenta673d9e848e51186602548a621e05925663b98be (diff)
downloadPeerTube-f162d32da098aa55f6de2367142faa166edb7c08.tar.gz
PeerTube-f162d32da098aa55f6de2367142faa166edb7c08.tar.zst
PeerTube-f162d32da098aa55f6de2367142faa166edb7c08.zip
Support lazy download thumbnails
Diffstat (limited to 'server/lib/video-pre-import.ts')
-rw-r--r--server/lib/video-pre-import.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/lib/video-pre-import.ts b/server/lib/video-pre-import.ts
index 0ac667ba3..ef9c38731 100644
--- a/server/lib/video-pre-import.ts
+++ b/server/lib/video-pre-import.ts
@@ -29,7 +29,7 @@ import {
29} from '@server/types/models' 29} from '@server/types/models'
30import { ThumbnailType, VideoImportCreate, VideoImportPayload, VideoImportState, VideoPrivacy, VideoState } from '@shared/models' 30import { ThumbnailType, VideoImportCreate, VideoImportPayload, VideoImportState, VideoPrivacy, VideoState } from '@shared/models'
31import { getLocalVideoActivityPubUrl } from './activitypub/url' 31import { getLocalVideoActivityPubUrl } from './activitypub/url'
32import { updateVideoMiniatureFromExisting, updateVideoMiniatureFromUrl } from './thumbnail' 32import { updateLocalVideoMiniatureFromExisting, updateVideoMiniatureFromUrl } from './thumbnail'
33import { VideoPasswordModel } from '@server/models/video/video-password' 33import { VideoPasswordModel } from '@server/models/video/video-password'
34 34
35class YoutubeDlImportError extends Error { 35class YoutubeDlImportError extends Error {
@@ -256,7 +256,7 @@ async function forgeThumbnail ({ inputPath, video, downloadUrl, type }: {
256 type: ThumbnailType 256 type: ThumbnailType
257}): Promise<MThumbnail> { 257}): Promise<MThumbnail> {
258 if (inputPath) { 258 if (inputPath) {
259 return updateVideoMiniatureFromExisting({ 259 return updateLocalVideoMiniatureFromExisting({
260 inputPath, 260 inputPath,
261 video, 261 video,
262 type, 262 type,