aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/video-playlist.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-06-04 09:19:01 +0200
committerChocobozzz <me@florianbigard.com>2021-06-04 15:45:44 +0200
commit91f8f8db97ffb83701c30f9cdb1e804670434eb0 (patch)
tree4b6659c8572d95b78454c6c4806ddc77a9c420e1 /server/controllers/api/video-playlist.ts
parent1333ab1f2d4ec495084c5368df25610683582ae3 (diff)
downloadPeerTube-91f8f8db97ffb83701c30f9cdb1e804670434eb0.tar.gz
PeerTube-91f8f8db97ffb83701c30f9cdb1e804670434eb0.tar.zst
PeerTube-91f8f8db97ffb83701c30f9cdb1e804670434eb0.zip
createThumbnail -> updateThumbnail
Diffstat (limited to 'server/controllers/api/video-playlist.ts')
-rw-r--r--server/controllers/api/video-playlist.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/controllers/api/video-playlist.ts b/server/controllers/api/video-playlist.ts
index b8613699b..7c816b93a 100644
--- a/server/controllers/api/video-playlist.ts
+++ b/server/controllers/api/video-playlist.ts
@@ -18,7 +18,7 @@ import { sequelizeTypescript } from '../../initializers/database'
18import { sendCreateVideoPlaylist, sendDeleteVideoPlaylist, sendUpdateVideoPlaylist } from '../../lib/activitypub/send' 18import { sendCreateVideoPlaylist, sendDeleteVideoPlaylist, sendUpdateVideoPlaylist } from '../../lib/activitypub/send'
19import { getLocalVideoPlaylistActivityPubUrl, getLocalVideoPlaylistElementActivityPubUrl } from '../../lib/activitypub/url' 19import { getLocalVideoPlaylistActivityPubUrl, getLocalVideoPlaylistElementActivityPubUrl } from '../../lib/activitypub/url'
20import { JobQueue } from '../../lib/job-queue' 20import { JobQueue } from '../../lib/job-queue'
21import { createPlaylistMiniatureFromExisting } from '../../lib/thumbnail' 21import { updatePlaylistMiniatureFromExisting } from '../../lib/thumbnail'
22import { 22import {
23 asyncMiddleware, 23 asyncMiddleware,
24 asyncRetryTransactionMiddleware, 24 asyncRetryTransactionMiddleware,
@@ -173,7 +173,7 @@ async function addVideoPlaylist (req: express.Request, res: express.Response) {
173 173
174 const thumbnailField = req.files['thumbnailfile'] 174 const thumbnailField = req.files['thumbnailfile']
175 const thumbnailModel = thumbnailField 175 const thumbnailModel = thumbnailField
176 ? await createPlaylistMiniatureFromExisting({ 176 ? await updatePlaylistMiniatureFromExisting({
177 inputPath: thumbnailField[0].path, 177 inputPath: thumbnailField[0].path,
178 playlist: videoPlaylist, 178 playlist: videoPlaylist,
179 automaticallyGenerated: false 179 automaticallyGenerated: false
@@ -215,7 +215,7 @@ async function updateVideoPlaylist (req: express.Request, res: express.Response)
215 215
216 const thumbnailField = req.files['thumbnailfile'] 216 const thumbnailField = req.files['thumbnailfile']
217 const thumbnailModel = thumbnailField 217 const thumbnailModel = thumbnailField
218 ? await createPlaylistMiniatureFromExisting({ 218 ? await updatePlaylistMiniatureFromExisting({
219 inputPath: thumbnailField[0].path, 219 inputPath: thumbnailField[0].path,
220 playlist: videoPlaylistInstance, 220 playlist: videoPlaylistInstance,
221 automaticallyGenerated: false 221 automaticallyGenerated: false
@@ -482,7 +482,7 @@ async function generateThumbnailForPlaylist (videoPlaylist: MVideoPlaylistThumbn
482 } 482 }
483 483
484 const inputPath = join(CONFIG.STORAGE.THUMBNAILS_DIR, videoMiniature.filename) 484 const inputPath = join(CONFIG.STORAGE.THUMBNAILS_DIR, videoMiniature.filename)
485 const thumbnailModel = await createPlaylistMiniatureFromExisting({ 485 const thumbnailModel = await updatePlaylistMiniatureFromExisting({
486 inputPath, 486 inputPath,
487 playlist: videoPlaylist, 487 playlist: videoPlaylist,
488 automaticallyGenerated: true, 488 automaticallyGenerated: true,