change let to const and use full length as names.

This commit is contained in:
Marie 2021-04-22 11:34:26 +02:00 committed by GitHub
parent 10c1e57680
commit 791a92a446
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,11 +16,11 @@ const observer = (event, arg) => {
if (mediaInfoModule.mediaInfo.status == "paused" && rpc) { if (mediaInfoModule.mediaInfo.status == "paused" && rpc) {
rpc.setActivity(idleStatus); rpc.setActivity(idleStatus);
} else if (rpc) { } else if (rpc) {
let csec = timeToSeconds(mediaInfoModule.mediaInfo.current.split(":")); const currentSeconds = timeToSeconds(mediaInfoModule.mediaInfo.current.split(":"));
let dsec = timeToSeconds(mediaInfoModule.mediaInfo.duration.split(":")); const durationSeconds = timeToSeconds(mediaInfoModule.mediaInfo.duration.split(":"));
const date = new Date(); const date = new Date();
let now = date.getTime() / 1000 | 0; const now = date.getTime() / 1000 | 0;
let remaining = date.setSeconds(date.getSeconds() + (dsec - csec)); const remaining = date.setSeconds(date.getSeconds() + (durationSeconds - currentSeconds));
if (mediaInfoModule.mediaInfo.url) { if (mediaInfoModule.mediaInfo.url) {
rpc.setActivity({ rpc.setActivity({
...idleStatus, ...idleStatus,