Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions actions/PlayAd.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ 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,
var_name="ad.duration",
default_value=options[0],
items=options,
title="ad-options-dropdown",
complex_var_name=True,
complex_var_name=True
)

def get_config_rows(self):
Expand All @@ -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)
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.5.1",
"version": "1.5.2",
"thumbnail": "store/thumbnail.png",
"id": "com_imdevinc_StreamControllerTwitchPlugin",
"name": "Twitch Integration",
Expand Down