Fix KeyError: 'librarySectionID' during syncPMStime
This commit is contained in:
parent
93cd265e8f
commit
2d2dd0fa12
1 changed files with 2 additions and 2 deletions
|
@ -365,7 +365,8 @@ class LibrarySync(Thread):
|
||||||
break
|
break
|
||||||
if not view.attrib['type'] == mediatype:
|
if not view.attrib['type'] == mediatype:
|
||||||
continue
|
continue
|
||||||
items = PF.GetAllPlexLeaves(view.attrib['key'],
|
libraryId = view.attrib['key']
|
||||||
|
items = PF.GetAllPlexLeaves(libraryId,
|
||||||
containerSize=self.limitindex)
|
containerSize=self.limitindex)
|
||||||
if items in (None, 401):
|
if items in (None, 401):
|
||||||
self.logMsg("Could not download section %s"
|
self.logMsg("Could not download section %s"
|
||||||
|
@ -393,7 +394,6 @@ class LibrarySync(Thread):
|
||||||
self.logMsg("Could not download metadata, aborting time sync", -1)
|
self.logMsg("Could not download metadata, aborting time sync", -1)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
libraryId = xml[0].attrib['librarySectionID']
|
|
||||||
timestamp = xml[0].attrib.get('lastViewedAt')
|
timestamp = xml[0].attrib.get('lastViewedAt')
|
||||||
if timestamp is None:
|
if timestamp is None:
|
||||||
timestamp = xml[0].attrib.get('updatedAt')
|
timestamp = xml[0].attrib.get('updatedAt')
|
||||||
|
|
Loading…
Reference in a new issue