Skip to content

Commit

Permalink
Add parent object when automatically building PlexObject
Browse files Browse the repository at this point in the history
  • Loading branch information
JonnyWong16 committed Dec 29, 2023
1 parent 5050686 commit 50ee424
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plexapi/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def _buildItem(self, elem, cls=None, initpath=None):
ecls = utils.PLEXOBJECTS.get(ehash, utils.PLEXOBJECTS.get(elem.tag))
# log.debug('Building %s as %s', elem.tag, ecls.__name__)
if ecls is not None:
return ecls(self._server, elem, initpath)
return ecls(self._server, elem, initpath, parent=self)
raise UnknownType(f"Unknown library type <{elem.tag} type='{etype}'../>")

def _buildItemOrNone(self, elem, cls=None, initpath=None):
Expand Down

0 comments on commit 50ee424

Please sign in to comment.