From 4ce9417771b1dacafd7c27d881bd29a450ba3a97 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Wed, 10 Feb 2016 01:07:52 -0600 Subject: [PATCH] Adjust server offline Prevent manual/repair sync from running when the server is not connected which causes errors. --- default.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/default.py b/default.py index 9932d758..91daef65 100644 --- a/default.py +++ b/default.py @@ -95,6 +95,14 @@ class Main: if mode == "settings": xbmc.executebuiltin('Addon.OpenSettings(plugin.video.emby)') 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": import librarysync lib = librarysync.LibrarySync()