Added more settings

This commit is contained in:
nutty
2026-06-28 04:06:45 +10:00
parent a52b07fccc
commit 9e175e2ac7
10 changed files with 144 additions and 78 deletions
+7 -15
View File
@@ -30,24 +30,16 @@ const artistLabel = document.getElementById('artist-label');
// PAGE SETUP //
////////////////
// Set property visibility
trackLabel.style.display = showPrimary ? '' : 'none';
artistLabel.style.display = showSecondary ? '' : 'none';
// Set container width
if (maxWidth > 0)
mainWrapper.style.width = `${maxWidth}px`;
else
mainWrapper.style.width = `100%`;
// Set album art style
switch (albumArt)
{
case 'none':
albumArtContainer.style.display = 'none';
break;
case 'show':
albumArtContainer.style.display = '';
break;
case 'spinny':
break;
}
// // Set progress bar visibility
// if (!showProgressBar)
// progressContainer.style.display = 'none';
@@ -169,8 +161,8 @@ async function ChangeTrack(mediaProps) {
// Wait for fade (0.5s), then swap the real text and hide overlay
setTimeout(() => {
trackLabel.innerText = mediaProps.Title;
artistLabel.innerText = mediaProps.Artist;
trackLabel.innerText = swapArtistTrack ? mediaProps.Artist : mediaProps.Title;
artistLabel.innerText = swapArtistTrack ? mediaProps.Title : mediaProps.Artist;
// Extract the image source string (use fallback if Windows has no art)
const newArtUrl = mediaProps.Base64Image;