fix the repeat requests for the same URL

This commit is contained in:
2025-06-25 17:13:46 -07:00
parent a599a5b246
commit 575bf35e7f
2 changed files with 5 additions and 2 deletions

View File

@ -44,7 +44,10 @@ async function getNowPlayingData() {
const timestampInput = document.querySelector('amp-lcd.lcd.lcd__music')?.shadowRoot
?.querySelector('input#playback-progress[aria-valuenow][aria-valuemax]');
const defaultArtworkBase64 = await imageUrlToBase64(defaultArtwork);
if (!artworkBase64Cache.defaultArtworkBase64) {
artworkBase64Cache.defaultArtworkBase64 = await imageUrlToBase64(defaultArtwork);
}
const defaultArtworkBase64 = artworkBase64Cache.defaultArtworkBase64;
if (!media) {
pauseStartTime = null;