def client(self, name): for elem in self.query('/clients'): if elem.attrib.get('name').lower() == name.lower(): return Client(self, elem) raise NotFound('Unknown client name: %s' % name)
def _findPlayer(self, data): elem = data.find('Player') if elem is not None: from plexapi.client import Client return Client(self.server, elem) return None
def clients(self): items = [] for elem in self.query('/clients'): items.append(Client(self, elem)) return items
def _find_player(self, data): elem = data.find('Player') if elem is not None: return Client(self.server, elem) return None