Adjust server offline

Prevent manual/repair sync from running when the server is not connected
which causes errors.
This commit is contained in:
angelblue05 2016-02-10 01:07:52 -06:00
parent 4171cbff69
commit 4ce9417771

View file

@ -95,6 +95,14 @@ class Main:
if mode == "settings": if mode == "settings":
xbmc.executebuiltin('Addon.OpenSettings(plugin.video.emby)') xbmc.executebuiltin('Addon.OpenSettings(plugin.video.emby)')
elif mode in ("manualsync", "repair"): elif mode in ("manualsync", "repair"):
if utils.window('emby_online') != "true":
# Server is not online, do not run the sync
xbmcgui.Dialog().ok(heading="Emby for Kodi",
line1=("Unable to run the sync, the add-on is not "
"connected to the Emby server."))
utils.logMsg("EMBY", "Not connected to the emby server.", 1)
return
if utils.window('emby_dbScan') != "true": if utils.window('emby_dbScan') != "true":
import librarysync import librarysync
lib = librarysync.LibrarySync() lib = librarysync.LibrarySync()