Add default playlist image
This commit is contained in:
parent
210feb6cc4
commit
5fb6996b81
3 changed files with 7 additions and 2 deletions
|
@ -51,7 +51,12 @@ export class VideoPlaylist implements ServerVideoPlaylist {
|
|||
this.privacy = hash.privacy
|
||||
|
||||
this.thumbnailPath = 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
|
||||
|
||||
|
|
BIN
client/src/assets/images/default-playlist.jpg
Normal file
BIN
client/src/assets/images/default-playlist.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.5 KiB |
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue