From 5fb6996b811a0cf266750d3c82e876079c8bc19e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 24 Apr 2019 11:10:42 +0200 Subject: Add default playlist image --- client/src/app/shared/video-playlist/video-playlist.model.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'client/src/app/shared') diff --git a/client/src/app/shared/video-playlist/video-playlist.model.ts b/client/src/app/shared/video-playlist/video-playlist.model.ts index ec8013e89..7e311aa54 100644 --- a/client/src/app/shared/video-playlist/video-playlist.model.ts +++ b/client/src/app/shared/video-playlist/video-playlist.model.ts @@ -51,7 +51,12 @@ export class VideoPlaylist implements ServerVideoPlaylist { 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 -- cgit v1.2.3