From 8a0cf918da52a4e6c6572b9df6f90b70c531c7a1 Mon Sep 17 00:00:00 2001
From: Eliot Berriot <contact@eliotberriot.com>
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 6c9d54ec..bcb66e95 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 1c9054ef..6d9b971a 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
-- 
GitLab