diff options
author | Chocobozzz <me@florianbigard.com> | 2023-06-06 15:59:51 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-06-29 10:19:33 +0200 |
commit | f162d32da098aa55f6de2367142faa166edb7c08 (patch) | |
tree | 31c6a96972994171853cb6c4e0b88b63241f8979 /server/lib/video-pre-import.ts | |
parent | a673d9e848e51186602548a621e05925663b98be (diff) | |
download | PeerTube-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.ts | 4 |
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' |
30 | import { ThumbnailType, VideoImportCreate, VideoImportPayload, VideoImportState, VideoPrivacy, VideoState } from '@shared/models' | 30 | import { ThumbnailType, VideoImportCreate, VideoImportPayload, VideoImportState, VideoPrivacy, VideoState } from '@shared/models' |
31 | import { getLocalVideoActivityPubUrl } from './activitypub/url' | 31 | import { getLocalVideoActivityPubUrl } from './activitypub/url' |
32 | import { updateVideoMiniatureFromExisting, updateVideoMiniatureFromUrl } from './thumbnail' | 32 | import { updateLocalVideoMiniatureFromExisting, updateVideoMiniatureFromUrl } from './thumbnail' |
33 | import { VideoPasswordModel } from '@server/models/video/video-password' | 33 | import { VideoPasswordModel } from '@server/models/video/video-password' |
34 | 34 | ||
35 | class YoutubeDlImportError extends Error { | 35 | class 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, |