Fixed bug with server-side sync function

This commit is contained in:
rainbow napkin 2025-04-10 20:36:02 -04:00
parent 3c144894c6
commit 17e736ab1a

View file

@ -713,6 +713,12 @@ module.exports = class{
//Send sync signal out to the channel //Send sync signal out to the channel
this.server.io.in(this.channel.name).emit("sync", {timestamp: this.timestamp}); this.server.io.in(this.channel.name).emit("sync", {timestamp: this.timestamp});
//If the media has been cleared out
if(this.nowPlaying == null){
//Fuck off and don't bother
return;
}
//If the media has over a second to go //If the media has over a second to go
if((this.timestamp + 1) < this.nowPlaying.duration){ if((this.timestamp + 1) < this.nowPlaying.duration){
//Increment the time stamp //Increment the time stamp