mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-10 14:14:19 +00:00
Fix matching field when validating filter field
This commit is contained in:
parent
7146587b0d
commit
814efb1def
1 changed files with 2 additions and 2 deletions
|
@ -783,11 +783,11 @@ class LibrarySection(PlexObject):
|
|||
libtype = _libtype or libtype or self.TYPE
|
||||
|
||||
try:
|
||||
filterField = next(f for f in self.listFields(libtype) if f.key.endswith(field))
|
||||
filterField = next(f for f in self.listFields(libtype) if f.key.split('.')[-1] == field)
|
||||
except StopIteration:
|
||||
for filterType in reversed(self.filterTypes()):
|
||||
if filterType.type != libtype:
|
||||
filterField = next((f for f in filterType.fields if f.key.endswith(field)), None)
|
||||
filterField = next((f for f in filterType.fields if f.key.split('.')[-1] == field), None)
|
||||
if filterField:
|
||||
break
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue