From a999778f52fa620166baaedfe39603f1d0b75f42 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Tue, 6 Apr 2021 23:43:42 -0400 Subject: [PATCH] removed redundant value --- plexapi/library.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/plexapi/library.py b/plexapi/library.py index 3d12a81f..e5dc8804 100644 --- a/plexapi/library.py +++ b/plexapi/library.py @@ -504,14 +504,10 @@ class LibrarySection(PlexObject): for settingID, value in kwargs.items(): try: - enums = idEnums.get(settingID) - try: - enumValues = [int(x) for x in enums] - except ValueError: - enumValues = [x for x in enums] - except TypeError: + enums = idEnums[settingID] + except KeyError: raise NotFound('%s not found in %s' % (value, list(idEnums.keys()))) - if value in enumValues: + if value in enums: data[key % settingID] = value else: raise NotFound('%s not found in %s' % (value, enums))