aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/job-queue/handlers/video-live-ending.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-02-16 08:50:40 +0100
committerChocobozzz <chocobozzz@cpy.re>2021-02-16 10:36:44 +0100
commita35a22797c99f17924347da9a226068c3dbe4787 (patch)
treeaffb713929145f90f6bda8828ded3ac2f4f73b19 /server/lib/job-queue/handlers/video-live-ending.ts
parent6302d599cdf98b5a5363a2a1dcdc266447950191 (diff)
downloadPeerTube-a35a22797c99f17924347da9a226068c3dbe4787.tar.gz
PeerTube-a35a22797c99f17924347da9a226068c3dbe4787.tar.zst
PeerTube-a35a22797c99f17924347da9a226068c3dbe4787.zip
Remove previous thumbnail if needed
Diffstat (limited to 'server/lib/job-queue/handlers/video-live-ending.ts')
-rw-r--r--server/lib/job-queue/handlers/video-live-ending.ts12
1 files changed, 10 insertions, 2 deletions
diff --git a/server/lib/job-queue/handlers/video-live-ending.ts b/server/lib/job-queue/handlers/video-live-ending.ts
index db6cd3682..6d50635bb 100644
--- a/server/lib/job-queue/handlers/video-live-ending.ts
+++ b/server/lib/job-queue/handlers/video-live-ending.ts
@@ -122,11 +122,19 @@ async function saveLive (video: MVideo, live: MVideoLive) {
122 122
123 // Regenerate the thumbnail & preview? 123 // Regenerate the thumbnail & preview?
124 if (videoWithFiles.getMiniature().automaticallyGenerated === true) { 124 if (videoWithFiles.getMiniature().automaticallyGenerated === true) {
125 await generateVideoMiniature(videoWithFiles, videoWithFiles.getMaxQualityFile(), ThumbnailType.MINIATURE) 125 await generateVideoMiniature({
126 video: videoWithFiles,
127 videoFile: videoWithFiles.getMaxQualityFile(),
128 type: ThumbnailType.MINIATURE
129 })
126 } 130 }
127 131
128 if (videoWithFiles.getPreview().automaticallyGenerated === true) { 132 if (videoWithFiles.getPreview().automaticallyGenerated === true) {
129 await generateVideoMiniature(videoWithFiles, videoWithFiles.getMaxQualityFile(), ThumbnailType.PREVIEW) 133 await generateVideoMiniature({
134 video: videoWithFiles,
135 videoFile: videoWithFiles.getMaxQualityFile(),
136 type: ThumbnailType.PREVIEW
137 })
130 } 138 }
131 139
132 await publishAndFederateIfNeeded(videoWithFiles, true) 140 await publishAndFederateIfNeeded(videoWithFiles, true)