From abff66d3e2e8c4eab171e7d108e66df5017e45f7 Mon Sep 17 00:00:00 2001 From: nutty Date: Sun, 16 Aug 2026 17:22:21 +1000 Subject: [PATCH] Pinned progress bar to 100% for sessions that can't provide timeline info ('Compact' theme) --- now-playing/themes/compact/script.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) 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;