if mediaType is in initpath call is from library

if not call is from server
This commit is contained in:
blacktwin 2020-03-16 15:12:41 -04:00
parent a9b149766b
commit 54a88da39b

View file

@ -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):