mirror of
https://github.com/Mastermindzh/tidal-hifi.git
synced 2025-05-11 21:43:07 +02:00
Merge a3aa45a96b432a54996ff8c48706b3e812b6e6b0 into ae699887b2a4ffac4ff8c1f843d64c008030b09b
This commit is contained in:
commit
b8ccc20c0d
@ -103,8 +103,7 @@ const getActivity = (): SetActivity => {
|
|||||||
if (includeTimestamps) {
|
if (includeTimestamps) {
|
||||||
const currentSeconds = convertDurationToSeconds(mediaInfo.current);
|
const currentSeconds = convertDurationToSeconds(mediaInfo.current);
|
||||||
const durationSeconds = convertDurationToSeconds(mediaInfo.duration);
|
const durationSeconds = convertDurationToSeconds(mediaInfo.duration);
|
||||||
const date = new Date();
|
const now = Math.trunc((Date.now() + 500) / 1000);
|
||||||
const now = Math.floor(date.getTime() / 1000);
|
|
||||||
presence.startTimestamp = now - currentSeconds;
|
presence.startTimestamp = now - currentSeconds;
|
||||||
presence.endTimestamp = presence.startTimestamp + durationSeconds;
|
presence.endTimestamp = presence.startTimestamp + durationSeconds;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user