mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 10:16:11 +00:00
Server online check
Only display the notification in the event the server was offline first. Removed the option to suppress it, as it is now useless. Also muted the notification.
This commit is contained in:
parent
b2655396cb
commit
c36b896f99
2 changed files with 4 additions and 5 deletions
|
@ -34,7 +34,7 @@
|
|||
</category>
|
||||
<category label="30022">
|
||||
<setting id="logLevel" type="enum" label="30004" values="None|Info|Debug" default="0" />
|
||||
<setting id="supressConnectMsg" type="bool" label="30249" default="false" visible="true" enable="true" />
|
||||
<!--<setting id="supressConnectMsg" type="bool" label="30249" default="false" visible="true" enable="true" /> -->
|
||||
<setting label="30239" type="action" action="RunPlugin(plugin://plugin.video.emby?mode=reset)" />
|
||||
|
||||
</category>
|
||||
|
|
|
@ -173,7 +173,7 @@ class Service():
|
|||
if self.server_online:
|
||||
WINDOW.setProperty("Server_online", "false")
|
||||
self.logMsg("Server is offline.", 1)
|
||||
xbmcgui.Dialog().notification("Error connecting", "%s Server is unreachable." % self.addonName)
|
||||
xbmcgui.Dialog().notification("Error connecting", "%s Server is unreachable." % self.addonName, sound=False)
|
||||
self.server_online = False
|
||||
else:
|
||||
# Server is online
|
||||
|
@ -183,11 +183,10 @@ class Service():
|
|||
if self.KodiMonitor.waitForAbort(5):
|
||||
# Abort was requested while waiting.
|
||||
break
|
||||
xbmcgui.Dialog().notification("Connection successful", "%s Server is online." % self.addonName, time=2000, sound=False)
|
||||
|
||||
self.server_online = True
|
||||
self.logMsg("Server is online and ready.", 1)
|
||||
addonSettings = xbmcaddon.Addon(id='plugin.video.emby')
|
||||
if addonSettings.getSetting("supressConnectMsg")=="false":
|
||||
xbmcgui.Dialog().notification("Connection successful", "%s Server is online." % self.addonName, time=2000)
|
||||
WINDOW.setProperty("Server_online", "true")
|
||||
|
||||
# Server is online, proceed.
|
||||
|
|
Loading…
Reference in a new issue