Don't show a warning if user aborted user selection
This commit is contained in:
parent
2b684941b7
commit
a7791bad0a
1 changed files with 9 additions and 6 deletions
|
@ -34,6 +34,7 @@ class UserClient(Thread):
|
||||||
|
|
||||||
self.auth = True
|
self.auth = True
|
||||||
self.retry = 0
|
self.retry = 0
|
||||||
|
self.aborted = False
|
||||||
|
|
||||||
self.user = None
|
self.user = None
|
||||||
self.has_access = True
|
self.has_access = True
|
||||||
|
@ -190,11 +191,13 @@ class UserClient(Thread):
|
||||||
|
|
||||||
# Give attempts at entering password / selecting user
|
# Give attempts at entering password / selecting user
|
||||||
if self.retry > 0:
|
if self.retry > 0:
|
||||||
LOG.error("Too many retries to login.")
|
if not self.aborted:
|
||||||
state.PMS_STATUS = 'Stop'
|
LOG.error("Too many retries to login.")
|
||||||
utils.dialog('ok', utils.lang(33001), utils.lang(39023))
|
state.PMS_STATUS = 'Stop'
|
||||||
executebuiltin(
|
# Failed to authenticate. Did you login to plex.tv?
|
||||||
'Addon.Openutils.settings(plugin.video.plexkodiconnect)')
|
utils.dialog('ok', utils.lang(33001), utils.lang(39023))
|
||||||
|
executebuiltin(
|
||||||
|
'Addon.OpenSettings(plugin.video.plexkodiconnect)')
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# If there's no settings.xml
|
# If there's no settings.xml
|
||||||
|
@ -237,7 +240,7 @@ class UserClient(Thread):
|
||||||
plextoken = utils.settings('plexToken')
|
plextoken = utils.settings('plexToken')
|
||||||
if plextoken:
|
if plextoken:
|
||||||
LOG.info("Trying to connect to plex.tv to get a user list")
|
LOG.info("Trying to connect to plex.tv to get a user list")
|
||||||
user, aborted = userselect.start()
|
user, self.aborted = userselect.start()
|
||||||
if not user:
|
if not user:
|
||||||
# FAILURE: Something went wrong, try again
|
# FAILURE: Something went wrong, try again
|
||||||
self.auth = True
|
self.auth = True
|
||||||
|
|
Loading…
Reference in a new issue