fix(playout): skip the identified queue instead of the current

Calling queues.s0_skip, liquidsoap was actually calling queues.s8_skip, because the current queue was 8
This commit is contained in:
jo 2023-02-25 14:36:49 +01:00 committed by Kyle Robbertze
parent d497c665cc
commit a59599971b
1 changed files with 5 additions and 3 deletions

View File

@ -15,7 +15,9 @@ sources = ref []
source_id = ref 0
def create_source()
l = request.equeue(id="s#{!source_id}", length=0.5)
this_source_id = !source_id
l = request.equeue(id="s#{this_source_id}", length=0.5)
l = audio_to_stereo(id="queue_src", l)
l = cue_cut(l)
@ -28,8 +30,8 @@ def create_source()
sources := list.append([l], !sources)
server.register(namespace="queues",
"s#{!source_id}_skip",
fun (s) -> begin log("queues.s#{!source_id}_skip")
"s#{this_source_id}_skip",
fun (s) -> begin log("queues.s#{this_source_id}_skip")
clear_queue(l)
"Done"
end)