From 5aedb3b29a95a9687bc32caf37d4354566ca20bc Mon Sep 17 00:00:00 2001 From: jeffvli Date: Thu, 4 Nov 2021 08:55:06 -0700 Subject: [PATCH] Add check for artistImageUrl for cover art --- src/api/api.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/api/api.ts b/src/api/api.ts index f1aa77f..f6c597b 100644 --- a/src/api/api.ts +++ b/src/api/api.ts @@ -114,7 +114,15 @@ const authParams = { }; const getCoverArtUrl = (item: any, useLegacyAuth: boolean, size = 150) => { - if (!item.coverArt) { + if (!item.coverArt && !item.artistImageUrl) { + return 'img/placeholder.jpg'; + } + + if (!item.coverArt && !item.artistImageUrl?.match('2a96cbd8b46e442fc41c2b86b821562f')) { + return item.artistImageUrl; + } + + if (item.artistImageUrl?.match('2a96cbd8b46e442fc41c2b86b821562f')) { return 'img/placeholder.jpg'; }