Replace addonName references

This commit is contained in:
tomkat83 2016-09-04 16:48:57 +02:00
parent 1230932af4
commit 394b6a240b
3 changed files with 14 additions and 11 deletions

View file

@ -18,6 +18,7 @@ import requests.packages.urllib3
requests.packages.urllib3.disable_warnings() requests.packages.urllib3.disable_warnings()
log = logging.getLogger("PLEX."+__name__) log = logging.getLogger("PLEX."+__name__)
addonName = 'PlexKodiConnect'
############################################################################### ###############################################################################
@ -282,7 +283,7 @@ class DownloadUtils():
'unauthorized') 'unauthorized')
window('plex_serverStatus', value="401") window('plex_serverStatus', value="401")
xbmcgui.Dialog().notification( xbmcgui.Dialog().notification(
self.addonName, addonName,
"Unauthorized for PMS", "Unauthorized for PMS",
xbmcgui.NOTIFICATION_ERROR) xbmcgui.NOTIFICATION_ERROR)
else: else:

View file

@ -20,6 +20,8 @@ from PlexFunctions import GetMachineIdentifier
log = logging.getLogger("PLEX."+__name__) log = logging.getLogger("PLEX."+__name__)
addonName = 'PlexKodiConnect'
############################################################################### ###############################################################################
@ -132,7 +134,7 @@ class UserClient(threading.Thread):
log.info("Access is granted.") log.info("Access is granted.")
self.HasAccess = True self.HasAccess = True
window('plex_serverStatus', clear=True) window('plex_serverStatus', clear=True)
xbmcgui.Dialog().notification(self.addonName, xbmcgui.Dialog().notification(addonName,
lang(33007)) lang(33007))
def loadCurrUser(self, username, userId, usertoken, authenticated=False): def loadCurrUser(self, username, userId, usertoken, authenticated=False):
@ -209,12 +211,12 @@ class UserClient(threading.Thread):
if settings('connectMsg') == "true": if settings('connectMsg') == "true":
if username: if username:
dialog.notification( dialog.notification(
heading=self.addonName, heading=addonName,
message="Welcome " + username, message="Welcome " + username,
icon="special://home/addons/plugin.video.plexkodiconnect/icon.png") icon="special://home/addons/plugin.video.plexkodiconnect/icon.png")
else: else:
dialog.notification( dialog.notification(
heading=self.addonName, heading=addonName,
message="Welcome", message="Welcome",
icon="special://home/addons/plugin.video.plexkodiconnect/icon.png") icon="special://home/addons/plugin.video.plexkodiconnect/icon.png")
return True return True

View file

@ -51,6 +51,7 @@ import loghandler
loghandler.config() loghandler.config()
log = logging.getLogger("PLEX.default") log = logging.getLogger("PLEX.default")
addonName = 'PlexKodiConnect'
############################################################################### ###############################################################################
@ -78,11 +79,10 @@ class Service():
value=xbmc.translatePath("special://profile")) value=xbmc.translatePath("special://profile"))
# Initial logging # Initial logging
log.warn("======== START %s ========" % self.addonName) log.warn("======== START %s ========" % addonName)
log.warn("Platform: %s" % (self.clientInfo.getPlatform())) log.warn("Platform: %s" % (self.clientInfo.getPlatform()))
log.warn("KODI Version: %s" % xbmc.getInfoLabel('System.BuildVersion')) log.warn("KODI Version: %s" % xbmc.getInfoLabel('System.BuildVersion'))
log.warn("%s Version: %s" % (self.addonName, log.warn("%s Version: %s" % (addonName, self.clientInfo.getVersion()))
self.clientInfo.getVersion()))
log.warn("Using plugin paths: %s" log.warn("Using plugin paths: %s"
% (settings('useDirectPaths') != "true")) % (settings('useDirectPaths') != "true"))
log.warn("Log Level: %s" % logLevel) log.warn("Log Level: %s" % logLevel)
@ -165,7 +165,7 @@ class Service():
# Reset authentication warnings # Reset authentication warnings
self.welcome_msg = False self.welcome_msg = False
xbmcgui.Dialog().notification( xbmcgui.Dialog().notification(
heading=self.addonName, heading=addonName,
message="%s %s" % (lang(33000), user.currUser), message="%s %s" % (lang(33000), user.currUser),
icon="special://home/addons/plugin.video.plexkodiconnect/icon.png", icon="special://home/addons/plugin.video.plexkodiconnect/icon.png",
time=2000, time=2000,
@ -226,7 +226,7 @@ class Service():
xbmcgui.Dialog().notification( xbmcgui.Dialog().notification(
heading=lang(33001), heading=lang(33001),
message="%s %s" message="%s %s"
% (self.addonName, lang(33002)), % (addonName, lang(33002)),
icon="special://home/addons/plugin.video." icon="special://home/addons/plugin.video."
"plexkodiconnect/icon.png", "plexkodiconnect/icon.png",
sound=False) sound=False)
@ -250,7 +250,7 @@ class Service():
break break
# Alert the user that server is online. # Alert the user that server is online.
xbmcgui.Dialog().notification( xbmcgui.Dialog().notification(
heading=self.addonName, heading=addonName,
message=lang(33003), message=lang(33003),
icon="special://home/addons/plugin.video." icon="special://home/addons/plugin.video."
"plexkodiconnect/icon.png", "plexkodiconnect/icon.png",
@ -309,7 +309,7 @@ class Service():
except: except:
pass pass
log.warn("======== STOP %s ========" % self.addonName) log.warn("======== STOP %s ========" % addonName)
# Delay option # Delay option
delay = int(settings('startupDelay')) delay = int(settings('startupDelay'))