Merge pull request #339 from o010b/master

Handle empty list of updates from server
This commit is contained in:
mcarlton00 2020-07-23 18:09:59 -04:00 committed by GitHub
commit be2c81c9ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 is 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'])