Added a Sync Time Feature

Sync Time is a time you can set to synchronize with last second subscriptions due to stream delay.
Default Value is set to 2 but can be changed in the config.
This commit is contained in:
Lea
2023-03-30 15:49:19 +02:00
committed by GitHub
parent 75bb5f5c0f
commit a88a096af8
2 changed files with 6 additions and 1 deletions
+3 -1
View File
@@ -179,10 +179,12 @@ const getNextTime = () => {
let differenceTime = endingTime - currentTime;
time = `${timeFunc.getHours(differenceTime)}:${timeFunc.getMinutes(differenceTime)}:${timeFunc.getSeconds(differenceTime)}`;
if (differenceTime <= 0) {
time = "00:00:00";
if (differenceTime <= (syncTime * 1000 * -1)) {
clearInterval(countdownUpdater);
countdownEnded = true;
time = "00:00:00";
logMessage("Core", "Timer Ended");
}
}
if (!paused){
window.localStorage.setItem('initialHours', timeFunc.getHours(differenceTime));