hook into on_exit_started obs event.

This commit is contained in:
onyx-and-iris 2023-07-08 20:43:30 +01:00
parent 768720e797
commit 640fb02c09

View File

@ -46,6 +46,7 @@ class OBSWS(ILayer):
self.on_stream_state_changed,
self.on_input_mute_state_changed,
self.on_current_program_scene_changed,
self.on_exit_started,
]
)
except (ConnectionRefusedError, TimeoutError) as e:
@ -69,6 +70,9 @@ class OBSWS(ILayer):
f"stream is {'live' if self._duckypad.stream.is_live else 'offline'}"
)
def on_exit_started(self, _):
self.event.unsubscribe()
@ensure_obsws
def call(self, fn_name, *args):
fn = getattr(self.request, fn_name)