diff --git a/actions/RecPlayPause/RecPlayPause.py b/actions/RecPlayPause/RecPlayPause.py index 770b00c..aaceeeb 100644 --- a/actions/RecPlayPause/RecPlayPause.py +++ b/actions/RecPlayPause/RecPlayPause.py @@ -5,6 +5,7 @@ class RecPlayPause(OBSActionBase): ACTION_NAME = "Recording Play/Pause" CONTROLS_KEY_IMAGE = True def __init__(self, deck_controller, page, coords): + self.current_state = -1 super().__init__(deck_controller=deck_controller, page=page, coords=coords) def on_ready(self): @@ -38,6 +39,9 @@ class RecPlayPause(OBSActionBase): 2: Paused 3: Stopping in progress """ + if state == self.current_state: + return + self.current_state = state image = "record_inactive.png" if state == 1: self.set_bottom_label("Pause", font_size=16) diff --git a/actions/ToggleRecord/ToggleRecord.py b/actions/ToggleRecord/ToggleRecord.py index 0d9822d..1fac12f 100644 --- a/actions/ToggleRecord/ToggleRecord.py +++ b/actions/ToggleRecord/ToggleRecord.py @@ -6,6 +6,7 @@ class ToggleRecord(OBSActionBase): ACTION_NAME = "Toggle Record" CONTROLS_KEY_IMAGE = True def __init__(self, deck_controller, page, coords): + self.current_state = -1 super().__init__(deck_controller=deck_controller, page=page, coords=coords) def on_ready(self): @@ -38,6 +39,9 @@ class ToggleRecord(OBSActionBase): 2: Paused 3: Stopping in progress """ + if state == self.current_state: + return + self.current_state = state image = "record_inactive.png" if state == 0: self.set_bottom_label(None)