From 54679b1d57cfb116d550d6d3ce919b31ae96d682 Mon Sep 17 00:00:00 2001 From: 7xnl <7xnl@proton.me> Date: Thu, 11 Sep 2025 01:33:34 +0300 Subject: [PATCH] discord: fixed timestamp update when seeking When seeking in a song, `RichPresence::Seeked()` receives the new position in microseconds and is supposed to update the RPC timestamp with the new position in seconds. However, it actually converts the value to milliseconds, meaning that if, for example, you seek to 0:05 in a song, Discord will think you seeked to 83:20, or 5000 seconds from the beginning of the song. This commit fixes this by simply dividing the microseconds value by one million instead of one thousand. --- src/discord/richpresence.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/discord/richpresence.cpp b/src/discord/richpresence.cpp index c5074061a..04a54c59b 100644 --- a/src/discord/richpresence.cpp +++ b/src/discord/richpresence.cpp @@ -167,7 +167,7 @@ void RichPresence::Seeked(const qint64 seek_microseconds) { if (!initialized_) return; - SetTimestamp(seek_microseconds / 1000LL); + SetTimestamp(seek_microseconds / 1000000LL); SendPresenceUpdate(); }