aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/job-queue/handlers
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/job-queue/handlers')
-rw-r--r--server/lib/job-queue/handlers/video-live-ending.ts12
1 files changed, 11 insertions, 1 deletions
diff --git a/server/lib/job-queue/handlers/video-live-ending.ts b/server/lib/job-queue/handlers/video-live-ending.ts
index 3892260c4..3d9341738 100644
--- a/server/lib/job-queue/handlers/video-live-ending.ts
+++ b/server/lib/job-queue/handlers/video-live-ending.ts
@@ -10,8 +10,9 @@ import { VideoFileModel } from '@server/models/video/video-file'
10import { VideoLiveModel } from '@server/models/video/video-live' 10import { VideoLiveModel } from '@server/models/video/video-live'
11import { VideoStreamingPlaylistModel } from '@server/models/video/video-streaming-playlist' 11import { VideoStreamingPlaylistModel } from '@server/models/video/video-streaming-playlist'
12import { MStreamingPlaylist, MVideo, MVideoLive } from '@server/types/models' 12import { MStreamingPlaylist, MVideo, MVideoLive } from '@server/types/models'
13import { VideoLiveEndingPayload, VideoState } from '@shared/models' 13import { ThumbnailType, VideoLiveEndingPayload, VideoState } from '@shared/models'
14import { logger } from '../../../helpers/logger' 14import { logger } from '../../../helpers/logger'
15import { generateVideoMiniature } from '@server/lib/thumbnail'
15 16
16async function processVideoLiveEnding (job: Bull.Job) { 17async function processVideoLiveEnding (job: Bull.Job) {
17 const payload = job.data as VideoLiveEndingPayload 18 const payload = job.data as VideoLiveEndingPayload
@@ -109,6 +110,15 @@ async function saveLive (video: MVideo, live: MVideoLive) {
109 await remove(videoInputPath) 110 await remove(videoInputPath)
110 } 111 }
111 112
113 // Regenerate the thumbnail & preview?
114 if (videoWithFiles.getMiniature().automaticallyGenerated === true) {
115 await generateVideoMiniature(videoWithFiles, videoWithFiles.getMaxQualityFile(), ThumbnailType.MINIATURE)
116 }
117
118 if (videoWithFiles.getPreview().automaticallyGenerated === true) {
119 await generateVideoMiniature(videoWithFiles, videoWithFiles.getMaxQualityFile(), ThumbnailType.PREVIEW)
120 }
121
112 await publishAndFederateIfNeeded(video, true) 122 await publishAndFederateIfNeeded(video, true)
113} 123}
114 124