diff --git a/resources/lib/downloadutils.py b/resources/lib/downloadutils.py index c200577e..19ed27eb 100644 --- a/resources/lib/downloadutils.py +++ b/resources/lib/downloadutils.py @@ -18,6 +18,7 @@ import requests.packages.urllib3 requests.packages.urllib3.disable_warnings() log = logging.getLogger("PLEX."+__name__) +addonName = 'PlexKodiConnect' ############################################################################### @@ -282,7 +283,7 @@ class DownloadUtils(): 'unauthorized') window('plex_serverStatus', value="401") xbmcgui.Dialog().notification( - self.addonName, + addonName, "Unauthorized for PMS", xbmcgui.NOTIFICATION_ERROR) else: diff --git a/resources/lib/userclient.py b/resources/lib/userclient.py index 49cc9385..ed9be930 100644 --- a/resources/lib/userclient.py +++ b/resources/lib/userclient.py @@ -20,6 +20,8 @@ from PlexFunctions import GetMachineIdentifier log = logging.getLogger("PLEX."+__name__) +addonName = 'PlexKodiConnect' + ############################################################################### @@ -132,7 +134,7 @@ class UserClient(threading.Thread): log.info("Access is granted.") self.HasAccess = True window('plex_serverStatus', clear=True) - xbmcgui.Dialog().notification(self.addonName, + xbmcgui.Dialog().notification(addonName, lang(33007)) def loadCurrUser(self, username, userId, usertoken, authenticated=False): @@ -209,12 +211,12 @@ class UserClient(threading.Thread): if settings('connectMsg') == "true": if username: dialog.notification( - heading=self.addonName, + heading=addonName, message="Welcome " + username, icon="special://home/addons/plugin.video.plexkodiconnect/icon.png") else: dialog.notification( - heading=self.addonName, + heading=addonName, message="Welcome", icon="special://home/addons/plugin.video.plexkodiconnect/icon.png") return True diff --git a/service.py b/service.py index 7d6377d9..180dac3c 100644 --- a/service.py +++ b/service.py @@ -51,6 +51,7 @@ import loghandler loghandler.config() log = logging.getLogger("PLEX.default") +addonName = 'PlexKodiConnect' ############################################################################### @@ -78,11 +79,10 @@ class Service(): value=xbmc.translatePath("special://profile")) # Initial logging - log.warn("======== START %s ========" % self.addonName) + log.warn("======== START %s ========" % addonName) log.warn("Platform: %s" % (self.clientInfo.getPlatform())) log.warn("KODI Version: %s" % xbmc.getInfoLabel('System.BuildVersion')) - log.warn("%s Version: %s" % (self.addonName, - self.clientInfo.getVersion())) + log.warn("%s Version: %s" % (addonName, self.clientInfo.getVersion())) log.warn("Using plugin paths: %s" % (settings('useDirectPaths') != "true")) log.warn("Log Level: %s" % logLevel) @@ -165,7 +165,7 @@ class Service(): # Reset authentication warnings self.welcome_msg = False xbmcgui.Dialog().notification( - heading=self.addonName, + heading=addonName, message="%s %s" % (lang(33000), user.currUser), icon="special://home/addons/plugin.video.plexkodiconnect/icon.png", time=2000, @@ -226,7 +226,7 @@ class Service(): xbmcgui.Dialog().notification( heading=lang(33001), message="%s %s" - % (self.addonName, lang(33002)), + % (addonName, lang(33002)), icon="special://home/addons/plugin.video." "plexkodiconnect/icon.png", sound=False) @@ -250,7 +250,7 @@ class Service(): break # Alert the user that server is online. xbmcgui.Dialog().notification( - heading=self.addonName, + heading=addonName, message=lang(33003), icon="special://home/addons/plugin.video." "plexkodiconnect/icon.png", @@ -309,7 +309,7 @@ class Service(): except: pass - log.warn("======== STOP %s ========" % self.addonName) + log.warn("======== STOP %s ========" % addonName) # Delay option delay = int(settings('startupDelay'))