From 14cfc4ea976264e7c120691fee3349c6619e5d24 Mon Sep 17 00:00:00 2001 From: jo Date: Wed, 22 Feb 2023 15:47:05 +0100 Subject: [PATCH] refactor(playout): rename dynamic_source to web_stream --- .../libretime_playout/liquidsoap/1.4/ls_lib.liq | 4 ++-- .../liquidsoap/1.4/ls_script.liq | 16 ++++++++-------- .../liquidsoap/client/_client.py | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/playout/libretime_playout/liquidsoap/1.4/ls_lib.liq b/playout/libretime_playout/liquidsoap/1.4/ls_lib.liq index dbf4ada78..2c7b72439 100644 --- a/playout/libretime_playout/liquidsoap/1.4/ls_lib.liq +++ b/playout/libretime_playout/liquidsoap/1.4/ls_lib.liq @@ -201,12 +201,12 @@ def clear_queue(s) source.skip(s) end -def set_dynamic_source_id(id) = +def set_web_stream_id(id) = web_stream_id := id string_of(!web_stream_id) end -def get_dynamic_source_id() = +def get_web_stream_id() = string_of(!web_stream_id) end diff --git a/playout/libretime_playout/liquidsoap/1.4/ls_script.liq b/playout/libretime_playout/liquidsoap/1.4/ls_script.liq index 38a409cc7..1d3480450 100644 --- a/playout/libretime_playout/liquidsoap/1.4/ls_script.liq +++ b/playout/libretime_playout/liquidsoap/1.4/ls_script.liq @@ -61,30 +61,30 @@ stream_queue = map_metadata(update=false, append_title, stream_queue) ignore(output.dummy(stream_queue, fallible=true)) -server.register(namespace="dynamic_source", +server.register(namespace="web_stream", description="Enable webstream output", usage='start', "output_start", - fun (s) -> begin log("dynamic_source.output_start") + fun (s) -> begin log("web_stream.output_start") notify([("schedule_table_id", !web_stream_id)]) web_stream_enabled := true "enabled" end) -server.register(namespace="dynamic_source", +server.register(namespace="web_stream", description="Enable webstream output", usage='stop', "output_stop", - fun (s) -> begin log("dynamic_source.output_stop") web_stream_enabled := false "disabled" end) + fun (s) -> begin log("web_stream.output_stop") web_stream_enabled := false "disabled" end) -server.register(namespace="dynamic_source", +server.register(namespace="web_stream", description="Set the streams cc_schedule row id", usage="id ", "id", - fun (s) -> begin log("dynamic_source.id") set_dynamic_source_id(s) end) + fun (s) -> begin log("web_stream.id") set_web_stream_id(s) end) -server.register(namespace="dynamic_source", +server.register(namespace="web_stream", description="Get the streams cc_schedule row id", usage="get_id", "get_id", - fun (s) -> begin log("dynamic_source.get_id") get_dynamic_source_id() end) + fun (s) -> begin log("web_stream.get_id") get_web_stream_id() end) default = amplify(id="silence_src", 0.00001, noise()) diff --git a/playout/libretime_playout/liquidsoap/client/_client.py b/playout/libretime_playout/liquidsoap/client/_client.py index ffe4ff6df..a44287fd4 100644 --- a/playout/libretime_playout/liquidsoap/client/_client.py +++ b/playout/libretime_playout/liquidsoap/client/_client.py @@ -77,27 +77,27 @@ class LiquidsoapClient: def web_stream_get_id(self) -> str: with self.conn: - self.conn.write("dynamic_source.get_id") + self.conn.write("web_stream.get_id") return self.conn.read().splitlines()[0] def web_stream_start(self) -> None: with self.conn: self.conn.write("streams.scheduled_play_start") - self.conn.write("dynamic_source.output_start") + self.conn.write("web_stream.output_start") def web_stream_start_buffer(self, schedule_id: int, uri: str) -> None: with self.conn: - self.conn.write(f"dynamic_source.id {schedule_id}") + self.conn.write(f"web_stream.id {schedule_id}") self.conn.write(f"http.restart {uri}") def web_stream_stop(self) -> None: with self.conn: - self.conn.write("dynamic_source.output_stop") + self.conn.write("web_stream.output_stop") def web_stream_stop_buffer(self) -> None: with self.conn: self.conn.write("http.stop") - self.conn.write("dynamic_source.id -1") + self.conn.write("web_stream.id -1") def source_disconnect(self, name: Literal["master_dj", "live_dj"]) -> None: command_map = {