Added persistent rescheduling of nowPlaying after server goes down.

This commit is contained in:
rainbow napkin 2025-02-11 07:39:20 -05:00
parent 179a10fb72
commit a41541d07b
10 changed files with 124 additions and 25 deletions

View file

@ -80,8 +80,10 @@ class queuePanel extends panelObj{
defineListeners(){
//Render queue when we receive a new copy of the queue data from the server
this.client.socket.on("clientMetadata", (data) => {this.renderQueue();});
this.client.socket.on("queue", (data) => {this.renderQueue();});
this.client.socket.on("clientMetadata", () => {this.renderQueue();});
this.client.socket.on("queue", () => {this.renderQueue();});
this.client.socket.on("start", () => {this.renderQueue();});
this.client.socket.on("end", () => {this.renderQueue();});
this.client.socket.on("lock", this.handleScheduleLock.bind(this));
this.client.socket.on("error", this.handleQueueError.bind(this));
}
@ -415,6 +417,12 @@ class queuePanel extends panelObj{
}
clearQueue(){
//If we have no body
if(this.ownerDoc.body == null){
//We have bigger issues
return;
}
//Clear out queue container
this.queueContainer.innerHTML = '';;
//Clear out queue marker container