From 5898fae1e9c7c0ec69a8d83b8c5d98755a4961a6 Mon Sep 17 00:00:00 2001 From: Core447 Date: Sun, 14 Jan 2024 13:55:40 +0100 Subject: [PATCH] Fix: Unable to reconnect to obs --- OBSActionBase.py | 2 +- backend/backend.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/OBSActionBase.py b/OBSActionBase.py index b836717..2d04f10 100644 --- a/OBSActionBase.py +++ b/OBSActionBase.py @@ -64,7 +64,7 @@ class OBSActionBase(ActionBase): def reconnect_obs(self): print("reconnecing obs") - self.PLUGIN_BASE.obs.connect_to(host=self.PLUGIN_BASE.get_settings()["ip"], port=self.PLUGIN_BASE.get_settings()["port"], password=self.PLUGIN_BASE.get_settings()["password"], timeout=3, legacy=False) + self.PLUGIN_BASE.backend.connect_to(host=self.PLUGIN_BASE.get_settings()["ip"], port=self.PLUGIN_BASE.get_settings()["port"], password=self.PLUGIN_BASE.get_settings()["password"], timeout=3, legacy=False) if self.PLUGIN_BASE.backend.get_connected(): self.status_label.set_label("Successfully connected to OBS") diff --git a/backend/backend.py b/backend/backend.py index 48559c4..d6f3e6d 100644 --- a/backend/backend.py +++ b/backend/backend.py @@ -42,8 +42,11 @@ class Backend(BackendBase): def toggle_record_pause(self): self.OBSController.toggle_record_pause() - + def connect_to(self, *args, **kwargs): + self.OBSController.connect_to(*args, **kwargs) + +print("init backend") backend = Backend()