refactor(playout): rename web_stream variables
This commit is contained in:
parent
676aabe046
commit
c95733191a
|
@ -15,13 +15,13 @@ def notify_queue(m)
|
|||
end
|
||||
|
||||
def notify_stream(m)
|
||||
if !current_dyn_id != "-1" then
|
||||
if !web_stream_id != "-1" then
|
||||
json_str = string.replace(pattern="\n",(fun (s) -> ""), json_of(m))
|
||||
#if a string has a single apostrophe in it, let's comment it out by ending the string before right before it
|
||||
#escaping the apostrophe, and then starting a new string right after it. This is why we use 3 apostrophes.
|
||||
json_str = string.replace(pattern="'",(fun (s) -> "'\''"), json_str)
|
||||
|
||||
gateway("webstream '#{!current_dyn_id}' '#{json_str}'")
|
||||
gateway("webstream '#{!web_stream_id}' '#{json_str}'")
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -234,12 +234,12 @@ def clear_queue(s)
|
|||
end
|
||||
|
||||
def set_dynamic_source_id(id) =
|
||||
current_dyn_id := id
|
||||
string_of(!current_dyn_id)
|
||||
web_stream_id := id
|
||||
string_of(!web_stream_id)
|
||||
end
|
||||
|
||||
def get_dynamic_source_id() =
|
||||
string_of(!current_dyn_id)
|
||||
string_of(!web_stream_id)
|
||||
end
|
||||
|
||||
#cc-4633
|
||||
|
@ -393,7 +393,7 @@ def http_fallback(~http_input_id,~http,~default)
|
|||
track_sensitive=false,
|
||||
transitions=[to_live,to_static],
|
||||
[(# make sure it is connected, and not buffering
|
||||
{connected() and source.is_ready(http) and !webstream_enabled}, http),
|
||||
{connected() and source.is_ready(http) and !web_stream_enabled}, http),
|
||||
({true},default)])
|
||||
|
||||
end
|
||||
|
|
|
@ -2,9 +2,8 @@ boot_timestamp = interactive.string("boot_timestamp", string_of(gettimeofday()))
|
|||
|
||||
#Dynamic source list
|
||||
#dyn_sources = ref []
|
||||
webstream_enabled = ref false
|
||||
|
||||
current_dyn_id = ref '-1'
|
||||
web_stream_enabled = ref false
|
||||
web_stream_id = ref '-1'
|
||||
|
||||
show_name = interactive.string("show_name", "")
|
||||
|
||||
|
@ -85,13 +84,13 @@ server.register(namespace="dynamic_source",
|
|||
usage='start',
|
||||
"output_start",
|
||||
fun (s) -> begin log("dynamic_source.output_start")
|
||||
notify([("schedule_table_id", !current_dyn_id)])
|
||||
webstream_enabled := true "enabled" end)
|
||||
notify([("schedule_table_id", !web_stream_id)])
|
||||
web_stream_enabled := true "enabled" end)
|
||||
server.register(namespace="dynamic_source",
|
||||
description="Enable webstream output",
|
||||
usage='stop',
|
||||
"output_stop",
|
||||
fun (s) -> begin log("dynamic_source.output_stop") webstream_enabled := false "disabled" end)
|
||||
fun (s) -> begin log("dynamic_source.output_stop") web_stream_enabled := false "disabled" end)
|
||||
|
||||
server.register(namespace="dynamic_source",
|
||||
description="Set the streams cc_schedule row id",
|
||||
|
|
Loading…
Reference in New Issue