mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-24 17:56:11 +00:00
Review server offline
Add settings to disable offline server message
This commit is contained in:
parent
feda0cb9df
commit
e19e90e703
4 changed files with 12 additions and 5 deletions
|
@ -229,6 +229,7 @@
|
|||
<string id="30542">Server</string>
|
||||
<string id="30543">Username or email</string>
|
||||
<string id="30544">Enable database locked fix (will slow syncing process)</string>
|
||||
<string id="30545">Enable server offline message</string>
|
||||
|
||||
<!-- dialogs -->
|
||||
<string id="30600">Sign in with Emby Connect</string>
|
||||
|
|
|
@ -254,6 +254,10 @@ class WebSocket_Client(threading.Thread):
|
|||
userclient.UserClient().get_user(data)
|
||||
self.librarySync.refresh_views = True
|
||||
|
||||
elif messageType == "ServerShuttingDown":
|
||||
# Server went offline
|
||||
window('emby_online', value="false")
|
||||
|
||||
def on_close(self, ws):
|
||||
log.debug("Closed.")
|
||||
|
||||
|
|
|
@ -67,6 +67,7 @@
|
|||
<setting id="additionalUsers" type="text" label="30528" default="" />
|
||||
<setting type="lsep" label="30534" />
|
||||
<setting id="connectMsg" type="bool" label="30249" default="true" />
|
||||
<setting id="offlinetMsg" type="bool" label="30545" default="true" />
|
||||
<setting id="restartMsg" type="bool" label="30530" default="false" />
|
||||
<setting id="newContent" type="bool" label="30531" default="false" />
|
||||
<setting id="newvideotime" type="number" label="30532" visible="eq(-1,true)" default="5" option="int" subsetting="true" />
|
||||
|
|
|
@ -227,6 +227,7 @@ class Service(object):
|
|||
log.info("Server is offline.")
|
||||
window('emby_online', value="false")
|
||||
|
||||
if settings('offlineMsg') == "true":
|
||||
xbmcgui.Dialog().notification(
|
||||
heading=lang(33001),
|
||||
message="%s %s" % (self.addonName, lang(33002)),
|
||||
|
|
Loading…
Reference in a new issue