Fix KeyError: 'librarySectionID' during syncPMStime

This commit is contained in:
tomkat83 2016-04-17 13:44:45 +02:00
parent 93cd265e8f
commit 2d2dd0fa12

View file

@ -365,7 +365,8 @@ class LibrarySync(Thread):
break
if not view.attrib['type'] == mediatype:
continue
items = PF.GetAllPlexLeaves(view.attrib['key'],
libraryId = view.attrib['key']
items = PF.GetAllPlexLeaves(libraryId,
containerSize=self.limitindex)
if items in (None, 401):
self.logMsg("Could not download section %s"
@ -393,7 +394,6 @@ class LibrarySync(Thread):
self.logMsg("Could not download metadata, aborting time sync", -1)
return False
libraryId = xml[0].attrib['librarySectionID']
timestamp = xml[0].attrib.get('lastViewedAt')
if timestamp is None:
timestamp = xml[0].attrib.get('updatedAt')