Merge pull request #366 from oddstr13/pr-json-filter-1

Filter keys containing None values from dictionaries returned from the server
This commit is contained in:
mcarlton00 2020-08-21 17:43:52 -04:00 committed by GitHub
commit 4e2c8a0af3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 214 additions and 26 deletions

View file

@ -376,7 +376,7 @@ class Library(threading.Thread):
include = []
filters = ["tvshows", "boxsets", "musicvideos", "music", "movies"]
sync = get_sync()
whitelist = [ x.replace('Mixed:', "") for x in sync['Whitelist'] ]
whitelist = [x.replace('Mixed:', "") for x in sync['Whitelist']]
LOG.info("--[ retrieve changes ] %s", last_sync)
# Get the item type of each synced library and build list of types to request
@ -395,7 +395,7 @@ class Library(threading.Thread):
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 ]))
result = self.server.jellyfin.get_sync_queue(last_sync, ",".join([x for x in query_filter]))
if result is None:
return True