Fix Info screen not returning

This commit is contained in:
croneter 2018-09-16 16:08:44 +02:00
parent c7bb333e97
commit c4f6a441b6
4 changed files with 17 additions and 23 deletions

View file

@ -216,7 +216,12 @@ def sign_in_with_pin():
Writes to Kodi settings file and returns the HomeUser or None
"""
xml = _sign_in_with_pin()
from .windows import background
bkgrd = background.BackgroundWindow.create(function=_sign_in_with_pin)
bkgrd.modal()
xml = bkgrd.result
del bkgrd
if not xml:
return
user = HomeUser(xml.attrib)
@ -235,7 +240,6 @@ def _sign_in_with_pin():
pre = signin.PreSignInWindow.open()
try:
pre = signin.PreSignInWindow.open()
try:
if not pre.doSignin:
return

View file

@ -19,10 +19,16 @@ class BackgroundWindow(kodigui.BaseWindow):
def __init__(self, *args, **kwargs):
kodigui.BaseWindow.__init__(self, *args, **kwargs)
self.result = None
self.function = kwargs.get('function')
def onAction(self, action):
kodigui.BaseWindow.onAction(self, action)
def onFirstInit(self):
self.function()
self.result = self.function()
self.doClose()

View file

@ -56,6 +56,7 @@ class SignInPlexPass(kodigui.BaseWindow):
if action == xbmcgui.ACTION_SELECT_ITEM:
self.retry = True
self.doClose()
kodigui.BaseWindow.onAction(self, action)
def onClick(self, controlID):
if controlID == self.RETRY_BUTTON_ID:
@ -84,6 +85,7 @@ class PreSignInWindow(kodigui.BaseWindow):
if action == xbmcgui.ACTION_SELECT_ITEM:
self.doSignin = True
self.doClose()
kodigui.BaseWindow.onAction(self, action)
def onClick(self, controlID):
if controlID == self.SIGNIN_BUTTON_ID:
@ -117,12 +119,8 @@ class PinLoginWindow(kodigui.BaseWindow):
self.setProperty('pin.image.3', '')
def onAction(self, action):
try:
if action == xbmcgui.ACTION_NAV_BACK or action == xbmcgui.ACTION_PREVIOUS_MENU:
self.abort = True
except:
utils.ERROR()
kodigui.BaseWindow.onAction(self, action)

View file

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<skin>
<defaultresolution>1080i</defaultresolution>
<defaultresolutionwide>1080i</defaultresolutionwide>
<version>1.0</version>
<!-- amount to zoom skin to remove overscan compensation -->
<zoom>0</zoom>
<credits>
<skinname>Main</skinname>
<name>Plex</name>
</credits>
</skin>