From 0daf18d5d456e7893834c574e99403f33db8f309 Mon Sep 17 00:00:00 2001 From: croneter Date: Thu, 1 Feb 2018 08:23:31 +0100 Subject: [PATCH] Prettify --- contextmenu.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/contextmenu.py b/contextmenu.py index 1ab7f553..1d49233f 100644 --- a/contextmenu.py +++ b/contextmenu.py @@ -8,19 +8,19 @@ from xbmcaddon import Addon from xbmc import translatePath, sleep, log, LOGERROR from xbmcgui import Window -_addon = Addon(id='plugin.video.plexkodiconnect') +_ADDON = Addon(id='plugin.video.plexkodiconnect') try: - _addon_path = _addon.getAddonInfo('path').decode('utf-8') + _ADDON_PATH = _ADDON.getAddonInfo('path').decode('utf-8') except TypeError: - _addon_path = _addon.getAddonInfo('path').decode() + _ADDON_PATH = _ADDON.getAddonInfo('path').decode() try: _base_resource = translatePath(os_path.join( - _addon_path, + _ADDON_PATH, 'resources', 'lib')).decode('utf-8') except TypeError: _base_resource = translatePath(os_path.join( - _addon_path, + _ADDON_PATH, 'resources', 'lib')).decode() sys_path.append(_base_resource) @@ -30,12 +30,12 @@ from pickler import unpickle_me, pickl_window ############################################################################### if __name__ == "__main__": - win = Window(10000) - while win.getProperty('plex_command'): + WINDOW = Window(10000) + while WINDOW.getProperty('plex_command'): sleep(20) - win.setProperty('plex_command', 'CONTEXT_menu') + WINDOW.setProperty('plex_command', 'CONTEXT_menu') while not pickl_window('plex_result'): sleep(50) - result = unpickle_me() - if result is None: + RESULT = unpickle_me() + if RESULT is None: log('PLEX.%s: Error encountered, aborting' % __name__, level=LOGERROR)