mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-22 11:43:13 +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,7 +684,12 @@ class Agent(PlexObject):
|
|||
self.identifier = data.attrib.get('identifier')
|
||||
self.primary = data.attrib.get('primary')
|
||||
self.shortIdentifier = self.identifier.rsplit('.', 1)[1]
|
||||
self.mediaTypes = [AgentMediaType(server=self._server, data=d) for d in data]
|
||||
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):
|
||||
key = '/:/plugins/%s/prefs' % self.identifier
|
||||
|
|
Loading…
Reference in a new issue