Fix: Possible crash if backend needs too long to start
This commit is contained in:
parent
efb24e2f08
commit
4637027f89
|
@ -13,6 +13,7 @@ class RecPlayPause(OBSActionBase):
|
|||
|
||||
def on_ready(self):
|
||||
# Connect to obs if not connected
|
||||
if self.plugin_base.backend is not None:
|
||||
if not self.plugin_base.backend.get_connected():
|
||||
# self.plugin_base.obs.connect_to(host="localhost", port=4444, timeout=3, legacy=False)
|
||||
self.reconnect_obs()
|
||||
|
|
|
@ -20,6 +20,7 @@ class SwitchScene(OBSActionBase):
|
|||
|
||||
def on_ready(self):
|
||||
# Connect to obs if not connected
|
||||
if self.plugin_base.backend is not None:
|
||||
if not self.plugin_base.backend.get_connected(): # self.plugin_base.obs.connect_to(host="localhost", port=4444, timeout=3, legacy=False)
|
||||
self.reconnect_obs()
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ class ToggleRecord(OBSActionBase):
|
|||
|
||||
def on_ready(self):
|
||||
# Connect to obs if not connected
|
||||
if self.plugin_base.backend is not None:
|
||||
if not self.plugin_base.backend.get_connected(): # self.plugin_base.obs.connect_to(host="localhost", port=4444, timeout=3, legacy=False)
|
||||
self.reconnect_obs()
|
||||
|
||||
|
|
Loading…
Reference in New Issue