Minor polish

This commit is contained in:
nutty
2026-07-03 00:49:22 +10:00
parent 15e5f91f01
commit 3ac06ed9c3
8 changed files with 33 additions and 31 deletions
+5 -3
View File
@@ -44,8 +44,10 @@ if (textAlignment == 'right')
////////////////////
async function ChangeTrack(mediaProps) {
trackLabel.style.opacity = "0";
artistLabel.style.opacity = "0";
if (trackLabel.innerText != (swapArtistTrack ? mediaProps.Artist : mediaProps.Title))
trackLabel.style.opacity = "0";
if (artistLabel.innerText != (swapArtistTrack ? mediaProps.Title : mediaProps.Artist))
artistLabel.style.opacity = "0";
albumArtLayer.style.opacity = "0";
// Wait for fade (0.5s), then swap the real text and hide overlay
@@ -54,7 +56,7 @@ async function ChangeTrack(mediaProps) {
artistLabel.innerText = swapArtistTrack ? mediaProps.Title : mediaProps.Artist;
// Extract the image source string (use fallback if Windows has no art)
const newArtUrl = mediaProps.Thumbnail;
const newArtUrl = mediaProps.Thumbnail ?? './images/placeholder.png';
// Set the image
albumArtLayer.style.backgroundImage = `url('${newArtUrl}')`;