From 50b457cb158b13070c8d12ca33da9ddfe23d1f76 Mon Sep 17 00:00:00 2001 From: Croneter Date: Wed, 4 Jul 2018 08:05:24 +0200 Subject: [PATCH] Fix imports - Fixes #503 --- default.py | 4 ++-- resources/lib/entrypoint.py | 12 +++++------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/default.py b/default.py index e25e0d94..6a3f75c4 100644 --- a/default.py +++ b/default.py @@ -169,9 +169,9 @@ class Main(): @staticmethod def deviceid(): deviceId_old = pickler.pickl_window('plex_client_Id') - from clientinfo import getDeviceId + from resources.lib import clientinfo try: - deviceId = getDeviceId(reset=True) + deviceId = clientinfo.getDeviceId(reset=True) except Exception as e: log.error('Failed to generate a new device Id: %s' % e) utils.dialog('ok', utils.lang(29999), utils.lang(33032)) diff --git a/resources/lib/entrypoint.py b/resources/lib/entrypoint.py index f1f14670..6c658f1e 100644 --- a/resources/lib/entrypoint.py +++ b/resources/lib/entrypoint.py @@ -31,7 +31,7 @@ def choose_pms_server(): """ LOG.info("Choosing PMS server requested, starting") - import initialsetup + from . import initialsetup setup = initialsetup.InitialSetup() server = setup.pick_pms(showDialog=True) if server is None: @@ -46,9 +46,8 @@ def choose_pms_server(): if not _log_out(): return - from utils import wipe_database # Wipe Kodi and Plex database as well as playlists and video nodes - wipe_database() + utils.wipe_database() # Log in again _log_in() @@ -81,7 +80,7 @@ def toggle_plex_tv_sign_in(): utils.plex_command('PLEX_USERNAME', '') else: LOG.info('Login to plex.tv') - import initialsetup + from . import initialsetup initialsetup.InitialSetup().plex_tv_sign_in() utils.dialog('notification', utils.lang(29999), @@ -180,10 +179,9 @@ def switch_plex_user(): if not _log_out(): return # First remove playlists of old user - from utils import delete_playlists, delete_nodes - delete_playlists() + utils.delete_playlists() # Remove video nodes - delete_nodes() + utils.delete_nodes() _log_in()