aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api')
-rw-r--r--server/controllers/api/video-playlist.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/server/controllers/api/video-playlist.ts b/server/controllers/api/video-playlist.ts
index b51490bf9..aa9053372 100644
--- a/server/controllers/api/video-playlist.ts
+++ b/server/controllers/api/video-playlist.ts
@@ -463,7 +463,13 @@ async function regeneratePlaylistThumbnail (videoPlaylist: MVideoPlaylistThumbna
463async function generateThumbnailForPlaylist (videoPlaylist: MVideoPlaylistThumbnail, video: MVideoThumbnail) { 463async function generateThumbnailForPlaylist (videoPlaylist: MVideoPlaylistThumbnail, video: MVideoThumbnail) {
464 logger.info('Generating default thumbnail to playlist %s.', videoPlaylist.url) 464 logger.info('Generating default thumbnail to playlist %s.', videoPlaylist.url)
465 465
466 const inputPath = join(CONFIG.STORAGE.THUMBNAILS_DIR, video.getMiniature().filename) 466 const videoMiniature = video.getMiniature()
467 if (!videoMiniature) {
468 logger.info('Cannot generate thumbnail for playlist %s because video %s does not have any.', videoPlaylist.url, video.url)
469 return
470 }
471
472 const inputPath = join(CONFIG.STORAGE.THUMBNAILS_DIR, videoMiniature.filename)
467 const thumbnailModel = await createPlaylistMiniatureFromExisting(inputPath, videoPlaylist, true, true) 473 const thumbnailModel = await createPlaylistMiniatureFromExisting(inputPath, videoPlaylist, true, true)
468 474
469 thumbnailModel.videoPlaylistId = videoPlaylist.id 475 thumbnailModel.videoPlaylistId = videoPlaylist.id