mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-26 10:46: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>
|
||||||
<category label="30022">
|
<category label="30022">
|
||||||
<setting id="logLevel" type="enum" label="30004" values="None|Info|Debug" default="0" />
|
<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)" />
|
<setting label="30239" type="action" action="RunPlugin(plugin://plugin.video.emby?mode=reset)" />
|
||||||
|
|
||||||
</category>
|
</category>
|
||||||
|
|
|
@ -173,7 +173,7 @@ class Service():
|
||||||
if self.server_online:
|
if self.server_online:
|
||||||
WINDOW.setProperty("Server_online", "false")
|
WINDOW.setProperty("Server_online", "false")
|
||||||
self.logMsg("Server is offline.", 1)
|
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
|
self.server_online = False
|
||||||
else:
|
else:
|
||||||
# Server is online
|
# Server is online
|
||||||
|
@ -183,11 +183,10 @@ class Service():
|
||||||
if self.KodiMonitor.waitForAbort(5):
|
if self.KodiMonitor.waitForAbort(5):
|
||||||
# Abort was requested while waiting.
|
# Abort was requested while waiting.
|
||||||
break
|
break
|
||||||
|
xbmcgui.Dialog().notification("Connection successful", "%s Server is online." % self.addonName, time=2000, sound=False)
|
||||||
|
|
||||||
self.server_online = True
|
self.server_online = True
|
||||||
self.logMsg("Server is online and ready.", 1)
|
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")
|
WINDOW.setProperty("Server_online", "true")
|
||||||
|
|
||||||
# Server is online, proceed.
|
# Server is online, proceed.
|
||||||
|
|
Loading…
Reference in a new issue