From 0a3213cae9dbb479611cc3e31c02a8d2622b9896 Mon Sep 17 00:00:00 2001 From: Cynthia Foxwell Date: Mon, 10 Oct 2022 13:26:03 -0600 Subject: [PATCH] utility.presence: fix equal timestamps for bar --- src/modules/utility.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/utility.js b/src/modules/utility.js index 1866d73..1c1e8fa 100644 --- a/src/modules/utility.js +++ b/src/modules/utility.js @@ -770,7 +770,10 @@ presence.callback = async function (msg, line) { const timeEnd = formatTime(length); const timePos = formatTime(position); - const progress = position / length; + const progress = + activity.timestamps.start == activity.timestamps.end + ? 1 + : position / length; const barLength = Math.round(progress * NOWPLAYING_BAR_LENGTH); const bar = `\`[${"=".repeat(barLength)}${" ".repeat(