From 69eddafb17c4cf8e5a6dbd19e6d216c58140d153 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 2 Feb 2021 14:00:46 +0100 Subject: Fix HLS generation after import script --- server/lib/job-queue/handlers/video-file-import.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'server/lib/job-queue/handlers/video-file-import.ts') diff --git a/server/lib/job-queue/handlers/video-file-import.ts b/server/lib/job-queue/handlers/video-file-import.ts index 582efea3a..cd95aa075 100644 --- a/server/lib/job-queue/handlers/video-file-import.ts +++ b/server/lib/job-queue/handlers/video-file-import.ts @@ -23,10 +23,21 @@ async function processVideoFileImport (job: Bull.Job) { return undefined } + const data = await getVideoFileResolution(payload.filePath) + await updateVideoFile(video, payload.filePath) const user = await UserModel.loadByChannelActorId(video.VideoChannel.actorId) - await onNewWebTorrentFileResolution(video, user) + + const newResolutionPayload = { + type: 'new-resolution-to-webtorrent' as 'new-resolution-to-webtorrent', + videoUUID: video.uuid, + resolution: data.videoFileResolution, + isPortraitMode: data.isPortraitMode, + copyCodecs: false, + isNewVideo: false + } + await onNewWebTorrentFileResolution(video, user, newResolutionPayload) return video } -- cgit v1.2.3