Fix KeyErrors

This commit is contained in:
croneter 2018-10-25 15:54:22 +02:00
parent 587df50c54
commit eee4554213

View file

@ -120,15 +120,15 @@ class FullSync(backgroundthread.KillableThread, common.libsync_mixin):
if not self.install_sync_done: if not self.install_sync_done:
state.PATH_VERIFIED = False state.PATH_VERIFIED = False
try: try:
iterator = PF.SectionItems(section['id'], iterator = PF.SectionItems(section['section_id'],
{'type': self.plex_type}) {'type': self.plex_type})
# Tell the processing thread about this new section # Tell the processing thread about this new section
queue_info = process_metadata.InitNewSection( queue_info = process_metadata.InitNewSection(
self.context, self.context,
utils.cast(int, iterator.get('totalSize', 0)), utils.cast(int, iterator.get('totalSize', 0)),
utils.cast(unicode, iterator.get('librarySectionTitle')), utils.cast(unicode, iterator.get('librarySectionTitle')),
section['id'], section['section_id'],
utils.cast(unicode, section['viewGroup'])) utils.cast(unicode, section['plex_type']))
self.queue.put(queue_info) self.queue.put(queue_info)
for xml_item in iterator: for xml_item in iterator:
if self.isCanceled(): if self.isCanceled():