]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/api/video-playlist.ts
Add default playlist image
[github/Chocobozzz/PeerTube.git] / server / controllers / api / video-playlist.ts
index 6a1d23529d376a0054312aa7fed57ff61648ba88..a17136401095fa521e143477a6c9ccf08df60247 100644 (file)
@@ -304,7 +304,7 @@ async function addVideoInPlaylist (req: express.Request, res: express.Response)
   })
 
   // If the user did not set a thumbnail, automatically take the video thumbnail
-  if (playlistElement.position === 1 && videoPlaylist.hasThumbnail() === false) {
+  if (videoPlaylist.hasThumbnail() === false) {
     logger.info('Generating default thumbnail to playlist %s.', videoPlaylist.url)
 
     const inputPath = join(CONFIG.STORAGE.THUMBNAILS_DIR, video.getMiniature().filename)