Fix: Status label not loading status on load

This commit is contained in:
Core447 2024-03-26 15:29:08 +01:00
parent 931073ceb3
commit 63cc5f280d
No known key found for this signature in database
GPG Key ID: 5B97C0BD62F98516
1 changed files with 5 additions and 1 deletions

View File

@ -74,7 +74,10 @@ class OBSActionBase(ActionBase):
port=self.plugin_base.get_settings().get("port"),
password=self.plugin_base.get_settings().get("password"),
timeout=3, legacy=False)
self.update_status_label()
def update_status_label(self) -> None:
if self.plugin_base.backend.get_connected():
self.status_label.set_label(self.plugin_base.lm.get("actions.base.status.connected"))
self.status_label.remove_css_class("red")
@ -85,4 +88,5 @@ class OBSActionBase(ActionBase):
self.status_label.add_css_class("red")
def get_custom_config_area(self):
self.update_status_label()
return self.status_label