From a4edd396f0d61f1264a8e9dddb24c4df4c1274ef Mon Sep 17 00:00:00 2001 From: Roscoe Date: Fri, 29 Aug 2025 23:45:32 +0100 Subject: [PATCH] Hide album art if not available --- app/View/Components/LastFMCurrent.php | 4 ++++ resources/views/components/lastfm-current.blade.php | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/View/Components/LastFMCurrent.php b/app/View/Components/LastFMCurrent.php index 85ec378..c74c080 100644 --- a/app/View/Components/LastFMCurrent.php +++ b/app/View/Components/LastFMCurrent.php @@ -16,6 +16,10 @@ public function __construct($track) { $this->track = $track; if (isLegacy()) { $path = parse_url($track["image"], PHP_URL_PATH); + if ($track["image"] === "") { + $this->artUrl = null; + return; + } $this->artUrl = "//".request()->getHttpHost()."/proxy/lastfm/".basename($path); } else { $this->artUrl = $track["image"]; diff --git a/resources/views/components/lastfm-current.blade.php b/resources/views/components/lastfm-current.blade.php index a0bfe54..973bbb3 100644 --- a/resources/views/components/lastfm-current.blade.php +++ b/resources/views/components/lastfm-current.blade.php @@ -1,6 +1,8 @@ @if (isLegacy()) - + @if ($artUrl !== null) + + @endif
Album cover for {{ $track[Album cover for {{ $track[ 

{{ $track["header"] }}: