From c02a95cc59c26a95b23283df096816197dd58f65 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Tue, 11 Oct 2016 18:37:47 +0200 Subject: [PATCH] Streamline code --- resources/lib/librarysync.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/resources/lib/librarysync.py b/resources/lib/librarysync.py index 900693bb..2a0188f7 100644 --- a/resources/lib/librarysync.py +++ b/resources/lib/librarysync.py @@ -1437,12 +1437,9 @@ class LibrarySync(Thread): def process_newitems(self, item): ratingKey = item['ratingKey'] xml = PF.GetPlexMetadata(ratingKey) - if xml in (None, 401): - log.error('Could not download data for %s, skipping' % ratingKey) - return False, item try: mediatype = xml[0].attrib['type'] - except (IndexError, KeyError): + except (IndexError, KeyError, TypeError): log.error('Could not download metadata for %s' % ratingKey) return False, item log.debug("Processing new/updated PMS item: %s" % ratingKey)