This commit is contained in:
SpootDev 2016-03-30 21:28:08 -05:00
parent 181824fef2
commit 01265595f5

View file

@ -366,12 +366,11 @@ class LibrarySync(threading.Thread):
emby = self.emby emby = self.emby
emby_db = embydb.Embydb_Functions(embycursor) emby_db = embydb.Embydb_Functions(embycursor)
kodi_db = kodidb.Kodidb_Functions(kodicursor) kodi_db = kodidb.Kodidb_Functions(kodicursor)
doUtils = self.doUtils
vnodes = self.vnodes vnodes = self.vnodes
# Get views # Get views
url = "{server}/emby/Users/{UserId}/Views?format=json" url = "{server}/emby/Users/{UserId}/Views?format=json"
result = doUtils(url) result = self.doUtils(url)
grouped_views = result['Items'] grouped_views = result['Items']
ordered_views = emby.getViews(sortedlist=True) ordered_views = emby.getViews(sortedlist=True)
all_views = [] all_views = []
@ -423,7 +422,7 @@ class LibrarySync(threading.Thread):
'Limit': 1, 'Limit': 1,
'IncludeItemTypes': emby_mediatypes[mediatype] 'IncludeItemTypes': emby_mediatypes[mediatype]
} # Get one item from server using the folderid } # Get one item from server using the folderid
result = doUtils(url, parameters=params) result = self.doUtils(url, parameters=params)
try: try:
verifyitem = result['Items'][0]['Id'] verifyitem = result['Items'][0]['Id']
except (TypeError, IndexError): except (TypeError, IndexError):