Fixed critical queueing bug

This commit is contained in:
rainbow napkin 2026-07-07 21:38:13 -04:00
parent 96a6f5c0d2
commit 1b22f16514
3 changed files with 11 additions and 4 deletions

View file

@ -353,6 +353,12 @@ class queue{
throw loggerUtils.exceptionSmith(`Unable to find channel document ${this.channel.name} while queue item!`, "queue");
}
//If the user doesn't have permission to be doing this shit
if(!((!this.locked && await chanDB.permCheck(socket.user, 'scheduleMedia')) || await chanDB.permCheck(socket.user, 'scheduleAdmin'))){
//Fuggettabouttit!
return;
}
//If something is playing
if(this.nowPlaying != null){
//Capture currently playing object
@ -399,7 +405,7 @@ class queue{
);
//Validate mode input, and default to overwrite
this.liveMode = (data.mode == "pushback") ? "pushback" : "overwrite";
this.liveMode = (data != null && data.mode == "pushback") ? "pushback" : "overwrite";
//Throw stream lock
this.streamLock = true;