diff options
Diffstat (limited to 'server/lib/job-queue/handlers')
-rw-r--r-- | server/lib/job-queue/handlers/video-file-import.ts | 13 | ||||
-rw-r--r-- | server/lib/job-queue/handlers/video-transcoding.ts | 2 |
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 ( | |||
189 | async function onNewWebTorrentFileResolution ( | 189 | async 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 | ||