From ef4696ff2fed59a1c667ce942beda7f61751e815 Mon Sep 17 00:00:00 2001 From: sfaulds Date: Mon, 28 Nov 2016 18:23:49 +1100 Subject: [PATCH] if fast sync server plugin fails fall back to full sync and tell the user --- resources/language/English/strings.xml | 1 + resources/lib/librarysync.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/language/English/strings.xml b/resources/language/English/strings.xml index 1061b58e..bfe0d9ff 100644 --- a/resources/language/English/strings.xml +++ b/resources/language/English/strings.xml @@ -352,5 +352,6 @@ Create a backup Backup folder Select content type to repair + Failed to retrieve latest updates using fast sync, using full sync. \ No newline at end of file diff --git a/resources/lib/librarysync.py b/resources/lib/librarysync.py index 22b975c9..90598179 100644 --- a/resources/lib/librarysync.py +++ b/resources/lib/librarysync.py @@ -136,9 +136,9 @@ class LibrarySync(threading.Thread): if settings('enableMusic') != "true": params['filter'] = "music" url = "{server}/emby/Emby.Kodi.SyncQueue/{UserId}/GetItems?format=json" - result = self.doUtils(url, parameters=params) try: + result = self.doUtils(url, parameters=params) processlist = { 'added': result['ItemsAdded'], @@ -149,13 +149,13 @@ class LibrarySync(threading.Thread): except (KeyError, TypeError): log.error("Failed to retrieve latest updates using fast sync.") + xbmcgui.Dialog().ok(language(29999), language(33095)) return False else: log.info("Fast sync changes: %s" % result) for action in processlist: self.triage_items(action, processlist[action]) - return True def saveLastSync(self):