Fix: using old set_key method instead of set_media

This commit is contained in:
Core447 2024-03-12 19:48:56 +01:00
parent 75a00839da
commit 3d2b889d7e
No known key found for this signature in database
GPG Key ID: 5B97C0BD62F98516
2 changed files with 4 additions and 4 deletions

View File

@ -55,7 +55,7 @@ class RecPlayPause(OBSActionBase):
else: else:
self.set_bottom_label(None) self.set_bottom_label(None)
self.set_key(media_path=os.path.join(self.plugin_base.PATH, "assets", image)) self.set_media(media_path=os.path.join(self.plugin_base.PATH, "assets", image))
def on_key_down(self): def on_key_down(self):
if not self.plugin_base.backend.get_connected(): if not self.plugin_base.backend.get_connected():

View File

@ -57,7 +57,7 @@ class ToggleRecord(OBSActionBase):
self.show_rec_time() self.show_rec_time()
image = "record_resume.png" image = "record_resume.png"
self.set_key(media_path=os.path.join(self.plugin_base.PATH, "assets", image)) self.set_media(media_path=os.path.join(self.plugin_base.PATH, "assets", image))
def on_key_down(self): def on_key_down(self):
if not self.plugin_base.backend.get_connected(): if not self.plugin_base.backend.get_connected():
@ -69,11 +69,11 @@ class ToggleRecord(OBSActionBase):
def show_rec_time(self): def show_rec_time(self):
if not self.plugin_base.backend.get_connected(): if not self.plugin_base.backend.get_connected():
self.set_key(media_path=os.path.join(self.plugin_base.PATH, "assets", "error.png")) self.set_media(media_path=os.path.join(self.plugin_base.PATH, "assets", "error.png"))
return return
status = self.plugin_base.backend.get_record_status() status = self.plugin_base.backend.get_record_status()
if status is None: if status is None:
self.set_key(media_path=os.path.join(self.plugin_base.PATH, "assets", "error.png")) self.set_media(media_path=os.path.join(self.plugin_base.PATH, "assets", "error.png"))
return return
if not status["active"]: if not status["active"]:
self.set_bottom_label(None) self.set_bottom_label(None)