From 7f74dd93f4145de4c06940e79348bf8afaab8162 Mon Sep 17 00:00:00 2001 From: croneter Date: Sat, 19 Aug 2017 16:49:29 +0200 Subject: [PATCH] Vastly improve sync speed for music --- resources/lib/library_sync/get_metadata.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/resources/lib/library_sync/get_metadata.py b/resources/lib/library_sync/get_metadata.py index 2100f1f0..afe47b5b 100644 --- a/resources/lib/library_sync/get_metadata.py +++ b/resources/lib/library_sync/get_metadata.py @@ -115,17 +115,9 @@ class Threaded_Get_Metadata(Thread): except (TypeError, IndexError, AttributeError): log.error('Could not get children for Plex id %s' % item['itemId']) - else: item['children'] = [] - for child in children_xml: - child_xml = GetPlexMetadata(child.attrib['ratingKey']) - try: - child_xml[0].attrib - except (TypeError, IndexError, AttributeError): - log.error('Could not get child for Plex id %s' - % child.attrib['ratingKey']) - else: - item['children'].append(child_xml[0]) + else: + item['children'] = children_xml # place item into out queue out_queue.put(item)