From 92b4fe80cc0239c6de0477e916fabcfe2dabe886 Mon Sep 17 00:00:00 2001 From: o010b Date: Thu, 23 Jul 2020 19:54:12 +0200 Subject: [PATCH] Handle empty list of updates from server --- jellyfin_kodi/library.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/jellyfin_kodi/library.py b/jellyfin_kodi/library.py index 0624d1c6..51950a77 100644 --- a/jellyfin_kodi/library.py +++ b/jellyfin_kodi/library.py @@ -393,12 +393,16 @@ class Library(threading.Thread): query_filter = list(set(filters) - set(include)) try: + # Get list of updates from server for synced library types and populate work queues + result = self.server.jellyfin.get_sync_queue(last_sync, ",".join([ x for x in query_filter ])) + + if result == None: + return True + updated = [] userdata = [] removed = [] - - # Get list of updates from server for synced library types and populate work queues - result = self.server.jellyfin.get_sync_queue(last_sync, ",".join([ x for x in query_filter ])) + updated.extend(result['ItemsAdded']) updated.extend(result['ItemsUpdated']) userdata.extend(result['UserDataChanged'])