From 8a0cf918da52a4e6c6572b9df6f90b70c531c7a1 Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Fri, 24 Jan 2020 07:16:28 +0100 Subject: [PATCH] Fix #1016: fixed broken fallback to album cover on artist card/detail --- front/src/components/audio/artist/Card.vue | 4 ++-- front/src/components/library/ArtistBase.vue | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/front/src/components/audio/artist/Card.vue b/front/src/components/audio/artist/Card.vue index 6c9d54ecc..bcb66e95f 100644 --- a/front/src/components/audio/artist/Card.vue +++ b/front/src/components/audio/artist/Card.vue @@ -51,13 +51,13 @@ export default { return url }, cover () { - if (this.artist.cover) { + if (this.artist.cover && this.artist.cover.original) { return this.artist.cover } return this.artist.albums.map((a) => { return a.cover }).filter((c) => { - return !!c + return c && c.original })[0] || {} }, } diff --git a/front/src/components/library/ArtistBase.vue b/front/src/components/library/ArtistBase.vue index 1c9054efd..6d9b971ac 100644 --- a/front/src/components/library/ArtistBase.vue +++ b/front/src/components/library/ArtistBase.vue @@ -230,12 +230,12 @@ export default { ) }, cover() { - if (this.object.cover) { + if (this.object.cover && this.object.cover.original) { return this.object.cover } return this.object.albums .filter(album => { - return album.cover + return album.cover && album.cover.original }) .map(album => { return album.cover