mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-22 03:33:08 +00:00
Refactor attribute filtering in PlexObject class (#1341)
* Refactor attribute filtering in PlexObject class - minor performance imporvement * Update plexapi/base.py Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> --------- Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
This commit is contained in:
parent
9d9dca8f44
commit
41f6b9cf93
1 changed files with 1 additions and 1 deletions
|
@ -440,7 +440,7 @@ class PlexObject:
|
|||
attrstr = parts[1] if len(parts) == 2 else None
|
||||
if attrstr:
|
||||
results = [] if results is None else results
|
||||
for child in [c for c in elem if c.tag.lower() == attr.lower()]:
|
||||
for child in (c for c in elem if c.tag.lower() == attr.lower()):
|
||||
results += self._getAttrValue(child, attrstr, results)
|
||||
return [r for r in results if r is not None]
|
||||
# check were looking for the tag
|
||||
|
|
Loading…
Reference in a new issue