From 4b242558eaa37343e7d724c90cd16563502bdfa3 Mon Sep 17 00:00:00 2001 From: rainbow napkin Date: Thu, 24 Sep 2026 18:41:21 -0400 Subject: [PATCH] Included previous fixes not implemented in merged version. --- src/app/channel/media/queue.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/app/channel/media/queue.js b/src/app/channel/media/queue.js index 597c062..628c112 100644 --- a/src/app/channel/media/queue.js +++ b/src/app/channel/media/queue.js @@ -357,6 +357,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 @@ -403,7 +409,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;