From 2f78ea46d92fdab625c41016d212f76194aad8dd Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Thu, 11 Jun 2015 04:57:33 -0500 Subject: [PATCH] Re-add connection message Reenabled the option to disable the message as well. --- resources/settings.xml | 2 +- service.py | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/resources/settings.xml b/resources/settings.xml index 8780eb5b..fd9facd4 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -36,7 +36,7 @@ - + diff --git a/service.py b/service.py index 7adeaf29..0a6c291e 100644 --- a/service.py +++ b/service.py @@ -71,6 +71,7 @@ class Service(): def ServiceEntryPoint(self): WINDOW = self.WINDOW + addon = xbmcaddon.Addon(id=self.clientInfo.getAddonId()) WINDOW.setProperty("Server_online", "") self.WINDOW.setProperty("Server_status", "") WINDOW.setProperty("Emby_Service_Timestamp", str(int(time.time()))) @@ -96,11 +97,11 @@ class Service(): # Server is online if (user.currUser != None) and (user.HasAccess == True): self.warn_auth = True - ''''if self.welcome_msg: - # Reset authentication warnings - self.welcome_msg = False - self.warn_auth = True - xbmcgui.Dialog().notification("Emby server", "Welcome %s!" % user.currUser, sound=False)''' + if addon.getSetting('supressConnectMsg') == "false": + if self.welcome_msg: + # Reset authentication warnings + self.welcome_msg = False + xbmcgui.Dialog().notification("Emby server", "Welcome %s!" % user.currUser, time=2000, sound=False) # Correctly launch the websocket, if user manually launches the add-on if (self.newWebSocketThread == None):