Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -17,7 +17,7 @@ import os
|
|||||||
import xbmcgui
|
import xbmcgui
|
||||||
|
|
||||||
from core import channeltools
|
from core import channeltools
|
||||||
from core import servertools
|
from core import servertools, scrapertools
|
||||||
from platformcode import config, logger
|
from platformcode import config, logger
|
||||||
|
|
||||||
|
|
||||||
@@ -260,7 +260,9 @@ class SettingsWindow(xbmcgui.WindowXMLDialog):
|
|||||||
return cond
|
return cond
|
||||||
|
|
||||||
# Obtenemos las condiciones
|
# Obtenemos las condiciones
|
||||||
conditions = re.compile("(!?eq|!?gt|!?lt)?\(([^,]+),[\"|']?([^)|'|\"]*)['|\"]?\)[ ]*([+||])?").findall(cond)
|
# conditions = re.compile("(!?eq|!?gt|!?lt)?\(([^,]+),[\"|']?([^)|'|\"]*)['|\"]?\)[ ]*([+||])?").findall(cond)
|
||||||
|
conditions = re.compile(r'''(!?eq|!?gt|!?lt)?\s*\(\s*([^, ]+)\s*,\s*["']?([^"'\)]+)["']?\)([+|])?''').findall(cond)
|
||||||
|
# conditions = scrapertools.find_multiple_matches(cond, r"(!?eq|!?gt|!?lt)?\(([^,]+),[\"|']?([^)|'|\"]*)['|\"]?\)[ ]*([+||])?")
|
||||||
for operator, id, value, next in conditions:
|
for operator, id, value, next in conditions:
|
||||||
# El id tiene que ser un numero, sino, no es valido y devuelve False
|
# El id tiene que ser un numero, sino, no es valido y devuelve False
|
||||||
try:
|
try:
|
||||||
@@ -827,9 +829,9 @@ class SettingsWindow(xbmcgui.WindowXMLDialog):
|
|||||||
if action == 1:
|
if action == 1:
|
||||||
# Si el foco no está en ninguno de los tres botones inferiores, y esta en un "list" cambiamos el valor
|
# Si el foco no está en ninguno de los tres botones inferiores, y esta en un "list" cambiamos el valor
|
||||||
if focus not in [10004, 10005, 10006]:
|
if focus not in [10004, 10005, 10006]:
|
||||||
control = self.getFocus()
|
control = self.getFocus().getId()
|
||||||
for cont in self.list_controls:
|
for cont in self.list_controls:
|
||||||
if cont["type"] == "list" and cont["control"] == control:
|
if cont["type"] == "list" and cont["control"].getId() == control:
|
||||||
index = cont["lvalues"].index(cont["label"].getLabel())
|
index = cont["lvalues"].index(cont["label"].getLabel())
|
||||||
if index > 0:
|
if index > 0:
|
||||||
cont["label"].setLabel(cont["lvalues"][index - 1])
|
cont["label"].setLabel(cont["lvalues"][index - 1])
|
||||||
@@ -853,9 +855,9 @@ class SettingsWindow(xbmcgui.WindowXMLDialog):
|
|||||||
elif action == 2:
|
elif action == 2:
|
||||||
# Si el foco no está en ninguno de los tres botones inferiores, y esta en un "list" cambiamos el valor
|
# Si el foco no está en ninguno de los tres botones inferiores, y esta en un "list" cambiamos el valor
|
||||||
if focus not in [10004, 10005, 10006]:
|
if focus not in [10004, 10005, 10006]:
|
||||||
control = self.getFocus()
|
control = self.getFocus().getId()
|
||||||
for cont in self.list_controls:
|
for cont in self.list_controls:
|
||||||
if cont["type"] == "list" and cont["control"] == control:
|
if cont["type"] == "list" and cont["control"].getId() == control:
|
||||||
index = cont["lvalues"].index(cont["label"].getLabel())
|
index = cont["lvalues"].index(cont["label"].getLabel())
|
||||||
if index < len(cont["lvalues"]) - 1:
|
if index < len(cont["lvalues"]) - 1:
|
||||||
cont["label"].setLabel(cont["lvalues"][index + 1])
|
cont["label"].setLabel(cont["lvalues"][index + 1])
|
||||||
@@ -880,11 +882,9 @@ class SettingsWindow(xbmcgui.WindowXMLDialog):
|
|||||||
# Si el foco no está en ninguno de los tres botones inferiores, bajamos el foco en los controles de ajustes
|
# Si el foco no está en ninguno de los tres botones inferiores, bajamos el foco en los controles de ajustes
|
||||||
if focus not in [10004, 10005, 10006]:
|
if focus not in [10004, 10005, 10006]:
|
||||||
try:
|
try:
|
||||||
focus_control = \
|
focus_control = [self.visible_controls.index(c) for c in self.visible_controls if c["control"].getId() == self.getFocus().getId()][0]
|
||||||
[self.visible_controls.index(c) for c in self.visible_controls if
|
|
||||||
c["control"] == self.getFocus()][
|
|
||||||
0]
|
|
||||||
focus_control += 1
|
focus_control += 1
|
||||||
|
|
||||||
except:
|
except:
|
||||||
focus_control = 0
|
focus_control = 0
|
||||||
|
|
||||||
@@ -905,9 +905,7 @@ class SettingsWindow(xbmcgui.WindowXMLDialog):
|
|||||||
if focus not in [10003, 10004, 10005, 10006]:
|
if focus not in [10003, 10004, 10005, 10006]:
|
||||||
try:
|
try:
|
||||||
focus_control = \
|
focus_control = \
|
||||||
[self.visible_controls.index(c) for c in self.visible_controls if
|
[self.visible_controls.index(c) for c in self.visible_controls if c["control"].getId() == self.getFocus().getId()][0]
|
||||||
c["control"] == self.getFocus()][
|
|
||||||
0]
|
|
||||||
focus_control -= 1
|
focus_control -= 1
|
||||||
|
|
||||||
while not focus_control == -1 and (self.visible_controls[focus_control]["type"] == "label" or not
|
while not focus_control == -1 and (self.visible_controls[focus_control]["type"] == "label" or not
|
||||||
|
|||||||
Reference in New Issue
Block a user