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 --- .../app/shared/video-playlist/video-playlist.model.ts | 7 ++++++- client/src/assets/images/default-playlist.jpg | Bin 0 -> 2554 bytes 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 client/src/assets/images/default-playlist.jpg (limited to 'client') 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 diff --git a/client/src/assets/images/default-playlist.jpg b/client/src/assets/images/default-playlist.jpg new file mode 100644 index 000000000..978fb16f2 Binary files /dev/null and b/client/src/assets/images/default-playlist.jpg differ -- cgit v1.2.3