diff --git a/resources/lib/initialsetup.py b/resources/lib/initialsetup.py index 0e665c19..52a187f0 100644 --- a/resources/lib/initialsetup.py +++ b/resources/lib/initialsetup.py @@ -117,12 +117,6 @@ class InitialSetup(object): Returns True if successful, or False if not """ - LOG.info('Showing plex.tv sign in window') - # Fix for: - # DEBUG: Activating window ID: 13000 - # INFO: Activate of window '13000' refused because there are active modal dialogs - # DEBUG: Activating window ID: 13000 - executebuiltin("Dialog.Close(all, true)") user = plex_tv.sign_in_with_pin() if user: self.plex_login = user.username diff --git a/resources/lib/plex_tv.py b/resources/lib/plex_tv.py index 606076ea..3cb35d77 100644 --- a/resources/lib/plex_tv.py +++ b/resources/lib/plex_tv.py @@ -4,6 +4,7 @@ from __future__ import absolute_import, division, unicode_literals from logging import getLogger import time import threading +import xbmc from .downloadutils import DownloadUtils as DU from . import utils, app @@ -216,6 +217,12 @@ def sign_in_with_pin(): Writes to Kodi settings file and returns the HomeUser or None """ + LOG.info('Showing plex.tv sign in window') + # Fix for: + # DEBUG: Activating window ID: 13000 + # INFO: Activate of window '13000' refused because there are active modal dialogs + # DEBUG: Activating window ID: 13000 + xbmc.executebuiltin("Dialog.Close(all, true)") from .windows import background bkgrd = background.BackgroundWindow.create(function=_sign_in_with_pin) bkgrd.modal()