diff --git a/actions/PlayAd.py b/actions/PlayAd.py index 917e338..5aff501 100644 --- a/actions/PlayAd.py +++ b/actions/PlayAd.py @@ -22,7 +22,7 @@ def __init__(self, *args, **kwargs): self.has_configuration = True def create_generative_ui(self): - options = [SimpleComboRowItem(x, f"{x} seconds") + options = [SimpleComboRowItem(str(x), f"{x} seconds") for x in [30, 60, 90, 120]] self._time_row = ComboRow( action_core=self, @@ -30,7 +30,7 @@ def create_generative_ui(self): default_value=options[0], items=options, title="ad-options-dropdown", - complex_var_name=True, + complex_var_name=True ) def get_config_rows(self): @@ -48,7 +48,8 @@ def create_event_assigners(self): def _on_play_ad(self, _): try: - self.backend.play_ad(10) + time = self._time_row.get_selected_item().get_value() + self.backend.play_ad(int(time)) except Exception as ex: log.error(ex) self.show_error(3) diff --git a/manifest.json b/manifest.json index 0909107..f2ed61e 100644 --- a/manifest.json +++ b/manifest.json @@ -1,5 +1,5 @@ { - "version": "1.5.1", + "version": "1.5.2", "thumbnail": "store/thumbnail.png", "id": "com_imdevinc_StreamControllerTwitchPlugin", "name": "Twitch Integration",