diff --git a/now-playing/themes/compact/script.js b/now-playing/themes/compact/script.js index b6ed0f7..9be4c9a 100644 --- a/now-playing/themes/compact/script.js +++ b/now-playing/themes/compact/script.js @@ -102,19 +102,20 @@ function SetProgressInfo(timelineProps, currentPositionMs, accentColorPalette) { // Ensure we don't divide by zero or exceed 100% const durationMs = timelineProps.EndTime; - // If the duration is 0, that means the session isn't returning any timeline info, so just put the progress at 100% - if (durationMs <= 0 || !showProgressBar) - { - progressBarTrack.style.display = 'none'; - return; - } - else - progressBarTrack.style.display = ''; - // Calculate the progress percentage let progressPercent = durationMs > 0 ? (currentPositionMs / durationMs) * 100 : 0; progressPercent = Math.min(100, Math.max(0, progressPercent)); + // If the duration is 0, that means the session isn't returning any timeline info, so just put the progress at 100% + if (durationMs <= 0 || !showProgressBar) + // { + // progressBarTrack.style.display = 'none'; + // return; + // } + // else + // progressBarTrack.style.display = ''; + progressPercent = 100; + // Calculate how much needs to be hidden (the right-side offset) const clipRight = 100 - progressPercent;