aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/job-queue/handlers
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-02-02 14:00:46 +0100
committerChocobozzz <me@florianbigard.com>2021-02-02 14:00:46 +0100
commit69eddafb17c4cf8e5a6dbd19e6d216c58140d153 (patch)
treeb211a62a88b0f57c371bc9e9b83de6ea1a0ee55e /server/lib/job-queue/handlers
parentd1a2ce5ef336a0fb260ff50a6740ebe483d9b8b9 (diff)
downloadPeerTube-69eddafb17c4cf8e5a6dbd19e6d216c58140d153.tar.gz
PeerTube-69eddafb17c4cf8e5a6dbd19e6d216c58140d153.tar.zst
PeerTube-69eddafb17c4cf8e5a6dbd19e6d216c58140d153.zip
Fix HLS generation after import script
Diffstat (limited to 'server/lib/job-queue/handlers')
-rw-r--r--server/lib/job-queue/handlers/video-file-import.ts13
-rw-r--r--server/lib/job-queue/handlers/video-transcoding.ts2
2 files changed, 13 insertions, 2 deletions
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) {
23 return undefined 23 return undefined
24 } 24 }
25 25
26 const data = await getVideoFileResolution(payload.filePath)
27
26 await updateVideoFile(video, payload.filePath) 28 await updateVideoFile(video, payload.filePath)
27 29
28 const user = await UserModel.loadByChannelActorId(video.VideoChannel.actorId) 30 const user = await UserModel.loadByChannelActorId(video.VideoChannel.actorId)
29 await onNewWebTorrentFileResolution(video, user) 31
32 const newResolutionPayload = {
33 type: 'new-resolution-to-webtorrent' as 'new-resolution-to-webtorrent',
34 videoUUID: video.uuid,
35 resolution: data.videoFileResolution,
36 isPortraitMode: data.isPortraitMode,
37 copyCodecs: false,
38 isNewVideo: false
39 }
40 await onNewWebTorrentFileResolution(video, user, newResolutionPayload)
30 41
31 return video 42 return video
32} 43}
diff --git a/server/lib/job-queue/handlers/video-transcoding.ts b/server/lib/job-queue/handlers/video-transcoding.ts
index 853cfebcd..4718a7d5c 100644
--- a/server/lib/job-queue/handlers/video-transcoding.ts
+++ b/server/lib/job-queue/handlers/video-transcoding.ts
@@ -189,7 +189,7 @@ async function onVideoFileOptimizer (
189async function onNewWebTorrentFileResolution ( 189async function onNewWebTorrentFileResolution (
190 video: MVideoUUID, 190 video: MVideoUUID,
191 user: MUserId, 191 user: MUserId,
192 payload?: NewResolutionTranscodingPayload | MergeAudioTranscodingPayload 192 payload: NewResolutionTranscodingPayload | MergeAudioTranscodingPayload
193) { 193) {
194 await publishAndFederateIfNeeded(video) 194 await publishAndFederateIfNeeded(video)
195 195