예제 #1
0
 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)
예제 #2
0
 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
예제 #3
0
 def clients(self):
     items = []
     for elem in self.query('/clients'):
         items.append(Client(self, elem))
     return items
예제 #4
0
 def _find_player(self, data):
     elem = data.find('Player')
     if elem is not None:
         return Client(self.server, elem)
     return None