Skip to content

Commit b296cc4

Browse files
committed
create Agent media class
1 parent 39bb93f commit b296cc4

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

plexapi/media.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -657,3 +657,21 @@ def _loadData(self, data):
657657
self.name = data.attrib.get('name')
658658
self.score = data.attrib.get('score')
659659
self.year = data.attrib.get('year')
660+
661+
662+
@utils.registerPlexObject
663+
class Agent(PlexObject):
664+
""" Represents a single Agent.
665+
666+
Attributes:
667+
TAG (str): 'Agent'
668+
"""
669+
TAG = 'Agent'
670+
671+
def _loadData(self, data):
672+
self._data = data
673+
self._initpath = '/system/agents'
674+
self.hasAttribution = data.attrib.get('hasAttribution')
675+
self.hasPrefs = data.attrib.get('hasPrefs')
676+
self.identifier = data.attrib.get('identifier')
677+
self.primary = data.attrib.get('primary')

0 commit comments

Comments
 (0)