Enable or disable server connection messages

This commit is contained in:
tomkat83 2016-03-15 15:20:40 +01:00
parent dc723f6bb4
commit cd930da509
4 changed files with 15 additions and 13 deletions

View file

@ -251,7 +251,7 @@
<string id="30246">Enable Netflix style next up notification</string> <string id="30246">Enable Netflix style next up notification</string>
<string id="30247"> - The number of seconds before the end to show the notification</string> <string id="30247"> - The number of seconds before the end to show the notification</string>
<string id="30248">Zeige Emby-Infodialog bei Abspiel/Auswahl Aktion</string> <string id="30248">Zeige Emby-Infodialog bei Abspiel/Auswahl Aktion</string>
<string id="30249">Unterdrücke Server-Verbindungsmeldungen beim Starten</string> <string id="30249">Server-Verbindungsmeldungen beim Starten anzeigen</string>
<string id="30250">Benutze lokale Pfade anstelle von Addon-Umleitungen beim Abspielen</string> <string id="30250">Benutze lokale Pfade anstelle von Addon-Umleitungen beim Abspielen</string>
<string id="30515">Max. Anzahl gleichzeitig nachgefragter PMS Einträge (Neustart!)</string> <string id="30515">Max. Anzahl gleichzeitig nachgefragter PMS Einträge (Neustart!)</string>

View file

@ -224,16 +224,17 @@ class UserClient(threading.Thread):
settings('accessToken', value=usertoken) settings('accessToken', value=usertoken)
dialog = xbmcgui.Dialog() dialog = xbmcgui.Dialog()
if username: if utils.settings('connectMsg') == "true":
dialog.notification( if username:
heading=self.addonName, dialog.notification(
message="Welcome " + username, heading=self.addonName,
icon="special://home/addons/plugin.video.plexkodiconnect/icon.png") message="Welcome " + username,
else: icon="special://home/addons/plugin.video.plexkodiconnect/icon.png")
dialog.notification( else:
heading=self.addonName, dialog.notification(
message="Welcome", heading=self.addonName,
icon="special://home/addons/plugin.video.plexkodiconnect/icon.png") message="Welcome",
icon="special://home/addons/plugin.video.plexkodiconnect/icon.png")
return True return True
def authenticate(self): def authenticate(self):

View file

@ -90,7 +90,6 @@
<setting id="skipContextMenu" type="bool" label="30520" default="false" visible="false"/> <setting id="skipContextMenu" type="bool" label="30520" default="false" visible="false"/>
<setting id="additionalUsers" type="text" label="30528" default="" visible="false"/> <setting id="additionalUsers" type="text" label="30528" default="" visible="false"/>
<setting type="lsep" label="30534" visible="false" /> <setting type="lsep" label="30534" visible="false" />
<setting id="connectMsg" type="bool" label="30249" default="true" visible="false" />
<setting id="restartMsg" type="bool" label="30530" default="false" visible="false" /> <setting id="restartMsg" type="bool" label="30530" default="false" visible="false" />
<setting id="newContent" type="bool" label="30531" default="false" visible="false" /> <setting id="newContent" type="bool" label="30531" default="false" visible="false" />
<setting id="newvideotime" type="number" label="30532" visible="false" default="5" option="int" subsetting="true" /> <setting id="newvideotime" type="number" label="30532" visible="false" default="5" option="int" subsetting="true" />
@ -104,5 +103,6 @@
<setting label="39019" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect/?mode=reset)" option="close" /> <!-- Perform local database reset (full resync) --> <setting label="39019" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect/?mode=reset)" option="close" /> <!-- Perform local database reset (full resync) -->
<setting label="39020" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect/?mode=texturecache)" option="close" /> <!-- Cache all images to Kodi texture cache --> <setting label="39020" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect/?mode=texturecache)" option="close" /> <!-- Cache all images to Kodi texture cache -->
<setting label="39021" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect/?mode=thememedia)" option="close" visible="false" /> <!-- Sync Plex Theme Media to Kodi --> <setting label="39021" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect/?mode=thememedia)" option="close" visible="false" /> <!-- Sync Plex Theme Media to Kodi -->
<setting id="connectMsg" type="bool" label="30249" default="true" />
</category> </category>
</settings> </settings>

View file

@ -168,7 +168,8 @@ class Service():
else: else:
# Start up events # Start up events
self.warn_auth = True self.warn_auth = True
if self.welcome_msg: if (utils.settings('connectMsg') == "true" and
self.welcome_msg):
# Reset authentication warnings # Reset authentication warnings
self.welcome_msg = False self.welcome_msg = False
xbmcgui.Dialog().notification( xbmcgui.Dialog().notification(