From ff2e4ede0fcfa9e692f0903d12c2325478888ba7 Mon Sep 17 00:00:00 2001 From: yellowsink Date: Thu, 24 Oct 2024 21:24:50 +0100 Subject: [PATCH] [lastfm] use aart to improve loading times --- plugins/lastfm/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/lastfm/index.ts b/plugins/lastfm/index.ts index 7911b39..21cb9e5 100644 --- a/plugins/lastfm/index.ts +++ b/plugins/lastfm/index.ts @@ -147,8 +147,8 @@ const getScrobbleListenbrainz = async () => { : `https://aart.yellows.ink/release/${track.additional_info.release_mbid}.webp`; if (albumArtUrl) { // test - const testRes = await fetch(albumArtUrl); - if (!testRes.redirected) albumArtUrl = undefined; + const testRes = await fetch(albumArtUrl, { method: "HEAD" }); + if (!testRes.ok) albumArtUrl = undefined; } return {