this.privacy = hash.privacy
this.thumbnailPath = hash.thumbnailPath
- this.thumbnailUrl = absoluteAPIUrl + hash.thumbnailPath
+
+ if (this.thumbnailPath) {
+ this.thumbnailUrl = absoluteAPIUrl + hash.thumbnailPath
+ } else {
+ this.thumbnailUrl = window.location.origin + '/client/assets/images/default-playlist.jpg'
+ }
this.videosLength = hash.videosLength
})
// 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)