diff options
Diffstat (limited to 'server/lib/job-queue/handlers/video-live-ending.ts')
-rw-r--r-- | server/lib/job-queue/handlers/video-live-ending.ts | 12 |
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' | |||
10 | import { VideoLiveModel } from '@server/models/video/video-live' | 10 | import { VideoLiveModel } from '@server/models/video/video-live' |
11 | import { VideoStreamingPlaylistModel } from '@server/models/video/video-streaming-playlist' | 11 | import { VideoStreamingPlaylistModel } from '@server/models/video/video-streaming-playlist' |
12 | import { MStreamingPlaylist, MVideo, MVideoLive } from '@server/types/models' | 12 | import { MStreamingPlaylist, MVideo, MVideoLive } from '@server/types/models' |
13 | import { VideoLiveEndingPayload, VideoState } from '@shared/models' | 13 | import { ThumbnailType, VideoLiveEndingPayload, VideoState } from '@shared/models' |
14 | import { logger } from '../../../helpers/logger' | 14 | import { logger } from '../../../helpers/logger' |
15 | import { generateVideoMiniature } from '@server/lib/thumbnail' | ||
15 | 16 | ||
16 | async function processVideoLiveEnding (job: Bull.Job) { | 17 | async 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 | ||