utility.presence: use pos and length for deciding instead of timestamps

This commit is contained in:
Cynthia Foxwell 2023-08-24 16:53:33 -06:00
parent be4210bd26
commit 768e1982eb
1 changed files with 1 additions and 4 deletions

View File

@ -963,10 +963,7 @@ presence.callback = async function (msg, line) {
const timeEnd = formatTime(length);
const timePos = formatTime(position);
const progress =
activity.timestamps.start >= activity.timestamps.end
? 1
: position / length;
const progress = position >= length ? 1 : position / length;
const barLength = Math.round(progress * NOWPLAYING_BAR_LENGTH);
const bar = `\`[${"=".repeat(barLength)}${" ".repeat(