mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-26 05:30:20 +00:00
if mediaType is in initpath call is from library
if not call is from server
This commit is contained in:
parent
a9b149766b
commit
54a88da39b
1 changed files with 6 additions and 1 deletions
|
@ -684,6 +684,11 @@ class Agent(PlexObject):
|
|||
self.identifier = data.attrib.get('identifier')
|
||||
self.primary = data.attrib.get('primary')
|
||||
self.shortIdentifier = self.identifier.rsplit('.', 1)[1]
|
||||
if 'mediaType' in self._initpath:
|
||||
self.languageCode = []
|
||||
for code in data:
|
||||
self.languageCode += [code.attrib.get('code')]
|
||||
else:
|
||||
self.mediaTypes = [AgentMediaType(server=self._server, data=d) for d in data]
|
||||
|
||||
def _settings(self):
|
||||
|
|
Loading…
Reference in a new issue