Fix imports

- Fixes #503
This commit is contained in:
Croneter 2018-07-04 08:05:24 +02:00
parent 98ba2b8caa
commit 50b457cb15
2 changed files with 7 additions and 9 deletions

View file

@ -169,9 +169,9 @@ class Main():
@staticmethod @staticmethod
def deviceid(): def deviceid():
deviceId_old = pickler.pickl_window('plex_client_Id') deviceId_old = pickler.pickl_window('plex_client_Id')
from clientinfo import getDeviceId from resources.lib import clientinfo
try: try:
deviceId = getDeviceId(reset=True) deviceId = clientinfo.getDeviceId(reset=True)
except Exception as e: except Exception as e:
log.error('Failed to generate a new device Id: %s' % e) log.error('Failed to generate a new device Id: %s' % e)
utils.dialog('ok', utils.lang(29999), utils.lang(33032)) utils.dialog('ok', utils.lang(29999), utils.lang(33032))

View file

@ -31,7 +31,7 @@ def choose_pms_server():
""" """
LOG.info("Choosing PMS server requested, starting") LOG.info("Choosing PMS server requested, starting")
import initialsetup from . import initialsetup
setup = initialsetup.InitialSetup() setup = initialsetup.InitialSetup()
server = setup.pick_pms(showDialog=True) server = setup.pick_pms(showDialog=True)
if server is None: if server is None:
@ -46,9 +46,8 @@ def choose_pms_server():
if not _log_out(): if not _log_out():
return return
from utils import wipe_database
# Wipe Kodi and Plex database as well as playlists and video nodes # Wipe Kodi and Plex database as well as playlists and video nodes
wipe_database() utils.wipe_database()
# Log in again # Log in again
_log_in() _log_in()
@ -81,7 +80,7 @@ def toggle_plex_tv_sign_in():
utils.plex_command('PLEX_USERNAME', '') utils.plex_command('PLEX_USERNAME', '')
else: else:
LOG.info('Login to plex.tv') LOG.info('Login to plex.tv')
import initialsetup from . import initialsetup
initialsetup.InitialSetup().plex_tv_sign_in() initialsetup.InitialSetup().plex_tv_sign_in()
utils.dialog('notification', utils.dialog('notification',
utils.lang(29999), utils.lang(29999),
@ -180,10 +179,9 @@ def switch_plex_user():
if not _log_out(): if not _log_out():
return return
# First remove playlists of old user # First remove playlists of old user
from utils import delete_playlists, delete_nodes utils.delete_playlists()
delete_playlists()
# Remove video nodes # Remove video nodes
delete_nodes() utils.delete_nodes()
_log_in() _log_in()