mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-10 14:14:19 +00:00
Bug #74 - getting error on clients
This commit is contained in:
parent
0aac1156a1
commit
16a55316f1
1 changed files with 2 additions and 4 deletions
|
@ -115,8 +115,7 @@ class PlexServer(object):
|
||||||
"""
|
"""
|
||||||
items = []
|
items = []
|
||||||
for elem in self.query('/clients'):
|
for elem in self.query('/clients'):
|
||||||
baseurl = 'http://%s:%s' % (elem.attrib['address'],
|
baseurl = 'http://%s:%s' % (elem.attrib['host'], elem.attrib['port'])
|
||||||
elem.attrib['port'])
|
|
||||||
items.append(PlexClient(baseurl, server=self, data=elem))
|
items.append(PlexClient(baseurl, server=self, data=elem))
|
||||||
return items
|
return items
|
||||||
|
|
||||||
|
@ -135,8 +134,7 @@ class PlexServer(object):
|
||||||
"""
|
"""
|
||||||
for elem in self.query('/clients'):
|
for elem in self.query('/clients'):
|
||||||
if elem.attrib.get('name').lower() == name.lower():
|
if elem.attrib.get('name').lower() == name.lower():
|
||||||
baseurl = 'http://%s:%s' % (
|
baseurl = 'http://%s:%s' % (elem.attrib['host'], elem.attrib['port'])
|
||||||
elem.attrib['address'], elem.attrib['port'])
|
|
||||||
return PlexClient(baseurl, server=self, data=elem)
|
return PlexClient(baseurl, server=self, data=elem)
|
||||||
raise NotFound('Unknown client name: %s' % name)
|
raise NotFound('Unknown client name: %s' % name)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue