Skip to content

Commit

Permalink
Splitted Dialog_Select into separate to avoid error about missing params
Browse files Browse the repository at this point in the history
  • Loading branch information
elgatito committed Apr 15, 2024
1 parent 4f4c246 commit 5e99c5d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions resources/site-packages/elementum/rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,13 @@ def Dialog_Confirm_With_Timeout(self, title, message, focused, timeout):

return int(dialog.yesno(getLocalizedLabel(title), getLocalizedLabel(message), nolabel=no, yeslabel=yes))

def Dialog_Select(self, title, items, autoclose, preselect):
def Dialog_Select(self, title, items):
dialog = xbmcgui.Dialog()
try:
return dialog.select(getLocalizedLabel(title), items, autoclose, preselect)
except:
return dialog.select(getLocalizedLabel(title), items)
return dialog.select(getLocalizedLabel(title), items)

def Dialog_Select_With_Options(self, title, items, autoclose, preselect):
dialog = xbmcgui.Dialog()
return dialog.select(getLocalizedLabel(title), items, autoclose, preselect)

def Dialog_Select_Large(self, title, subject, items):
title_encoded = "%s %s" % (getLocalizedLabel(title), toUtf8(subject))
Expand Down

0 comments on commit 5e99c5d

Please sign in to comment.