Skip to content

Commit

Permalink
[lastfm] use aart to improve loading times
Browse files Browse the repository at this point in the history
  • Loading branch information
yellowsink committed Oct 24, 2024
1 parent e0cd373 commit ff2e4ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/lastfm/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit ff2e4ed

Please sign in to comment.