catch errors on desktop scrobble notification failure (#1723)

This commit is contained in:
jeffvli
2026-02-18 20:54:31 -08:00
parent 75af57a7b3
commit 5039012fcb
@@ -219,11 +219,20 @@ export const useScrobble = () => {
? currentSong.artists.map((artist) => artist.name).join(' · ') ? currentSong.artists.map((artist) => artist.name).join(' · ')
: currentSong.artistName; : currentSong.artistName;
new Notification(`${currentSong.name}`, { try {
body: `${artists}\n${currentSong.album}`, new Notification(`${currentSong.name}`, {
icon: imageUrlRef.current || undefined, body: `${artists}\n${currentSong.album}`,
silent: true, icon: imageUrlRef.current || undefined,
}); silent: true,
});
} catch (error) {
logFn.error('an error occurred while sending a desktop notification', {
category: LogCategory.SCROBBLE,
meta: {
error: error as Error,
},
});
}
} }
}, 1000); }, 1000);
} }