aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos/index.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-08-01 16:54:24 +0200
committerChocobozzz <me@florianbigard.com>2019-08-01 16:54:24 +0200
commit65af03a241aa83ab7ba71278b6c99acd26428b8a (patch)
tree0cc04c31cdf631d11a915ae40389e8fa141f136b /server/controllers/api/videos/index.ts
parenta21e25ff641854c8b01664cb18655aa420620af6 (diff)
downloadPeerTube-65af03a241aa83ab7ba71278b6c99acd26428b8a.tar.gz
PeerTube-65af03a241aa83ab7ba71278b6c99acd26428b8a.tar.zst
PeerTube-65af03a241aa83ab7ba71278b6c99acd26428b8a.zip
Automatically update playlist thumbnails
Diffstat (limited to 'server/controllers/api/videos/index.ts')
-rw-r--r--server/controllers/api/videos/index.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts
index 973bf1123..155ca4678 100644
--- a/server/controllers/api/videos/index.ts
+++ b/server/controllers/api/videos/index.ts
@@ -223,13 +223,13 @@ async function addVideo (req: express.Request, res: express.Response) {
223 // Process thumbnail or create it from the video 223 // Process thumbnail or create it from the video
224 const thumbnailField = req.files['thumbnailfile'] 224 const thumbnailField = req.files['thumbnailfile']
225 const thumbnailModel = thumbnailField 225 const thumbnailModel = thumbnailField
226 ? await createVideoMiniatureFromExisting(thumbnailField[0].path, video, ThumbnailType.MINIATURE) 226 ? await createVideoMiniatureFromExisting(thumbnailField[0].path, video, ThumbnailType.MINIATURE, false)
227 : await generateVideoMiniature(video, videoFile, ThumbnailType.MINIATURE) 227 : await generateVideoMiniature(video, videoFile, ThumbnailType.MINIATURE)
228 228
229 // Process preview or create it from the video 229 // Process preview or create it from the video
230 const previewField = req.files['previewfile'] 230 const previewField = req.files['previewfile']
231 const previewModel = previewField 231 const previewModel = previewField
232 ? await createVideoMiniatureFromExisting(previewField[0].path, video, ThumbnailType.PREVIEW) 232 ? await createVideoMiniatureFromExisting(previewField[0].path, video, ThumbnailType.PREVIEW, false)
233 : await generateVideoMiniature(video, videoFile, ThumbnailType.PREVIEW) 233 : await generateVideoMiniature(video, videoFile, ThumbnailType.PREVIEW)
234 234
235 // Create the torrent file 235 // Create the torrent file
@@ -329,11 +329,11 @@ async function updateVideo (req: express.Request, res: express.Response) {
329 329
330 // Process thumbnail or create it from the video 330 // Process thumbnail or create it from the video
331 const thumbnailModel = req.files && req.files['thumbnailfile'] 331 const thumbnailModel = req.files && req.files['thumbnailfile']
332 ? await createVideoMiniatureFromExisting(req.files['thumbnailfile'][0].path, videoInstance, ThumbnailType.MINIATURE) 332 ? await createVideoMiniatureFromExisting(req.files['thumbnailfile'][0].path, videoInstance, ThumbnailType.MINIATURE, false)
333 : undefined 333 : undefined
334 334
335 const previewModel = req.files && req.files['previewfile'] 335 const previewModel = req.files && req.files['previewfile']
336 ? await createVideoMiniatureFromExisting(req.files['previewfile'][0].path, videoInstance, ThumbnailType.PREVIEW) 336 ? await createVideoMiniatureFromExisting(req.files['previewfile'][0].path, videoInstance, ThumbnailType.PREVIEW, false)
337 : undefined 337 : undefined
338 338
339 try { 339 try {