mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-31 00:11:59 +02:00
Fix update media end time
This commit is contained in:
@@ -145,15 +145,16 @@ class ClapperRevealerTop extends CustomRevealer
|
||||
setTimes(currTime, endTime)
|
||||
{
|
||||
let now = currTime.format(this.timeFormat);
|
||||
let end = `Ends at: ${endTime.format(this.timeFormat)}`;
|
||||
let end = endTime.format(this.timeFormat);
|
||||
let endText = `Ends at: ${end}`;
|
||||
|
||||
this.currentTime.set_label(now);
|
||||
this.endTime.set_label(end);
|
||||
this.endTime.set_label(endText);
|
||||
|
||||
/* Make sure that next timeout is always run after clock changes,
|
||||
* by delaying it for additional few milliseconds */
|
||||
let nextUpdate = 60002 - parseInt(currTime.get_seconds() * 1000);
|
||||
debug(`updated current time: ${now}`);
|
||||
debug(`updated current time: ${now}, ends at: ${end}`);
|
||||
|
||||
return nextUpdate;
|
||||
}
|
||||
|
Reference in New Issue
Block a user