Fix Configurazione Videoteca
This commit is contained in:
@@ -243,9 +243,13 @@ class SettingsWindow(xbmcgui.WindowXMLDialog):
|
||||
return cond
|
||||
|
||||
# Get the conditions
|
||||
# dbg()
|
||||
conditions = re.compile(r'''(!?eq|!?gt|!?lt)?\s*\(\s*([^, ]+)\s*,\s*["']?([^"'\)]+)["']?\)([+|])?''').findall(cond)
|
||||
for operator, id, value, next in conditions:
|
||||
# The id must be a number, otherwise it is not valid and returns False
|
||||
matches = match(value, patron=r'@(\d+)').matches
|
||||
if matches:
|
||||
for m in matches:
|
||||
value = value.replace('@' + m, config.get_localized_string(int(m)))
|
||||
try:
|
||||
id = int(id)
|
||||
except:
|
||||
@@ -263,11 +267,6 @@ class SettingsWindow(xbmcgui.WindowXMLDialog):
|
||||
if c["type"] == "list": control_value = c["label"].getLabel()
|
||||
if c["type"] == "label": control_value = c["control"].getLabel()
|
||||
|
||||
matches = match(self.caption, patron=r'@(\d+)').matches
|
||||
if matches:
|
||||
for m in matches:
|
||||
self.caption = self.caption.replace('@' + match, config.get_localized_string(int(m)))
|
||||
|
||||
# Operations lt "less than" and gt "greater than" require comparisons to be numbers, otherwise it returns
|
||||
# False
|
||||
if operator in ["lt", "!lt", "gt", "!gt"]:
|
||||
|
||||
Reference in New Issue
Block a user