We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dd80deb commit a4e6ec6Copy full SHA for a4e6ec6
1 file changed
plexapi/server.py
@@ -413,16 +413,17 @@ def clients(self):
413
return items
414
415
def client(self, name):
416
- """ Returns the :class:`~plexapi.client.PlexClient` that matches the specified name.
+ """ Returns the :class:`~plexapi.client.PlexClient` that matches the specified name
417
+ or machine identifier.
418
419
Parameters:
- name (str): Name of the client to return.
420
+ name (str): Name or machine identifier of the client to return.
421
422
Raises:
423
:exc:`~plexapi.exceptions.NotFound`: Unknown client name.
424
"""
425
for client in self.clients():
- if client and client.title == name:
426
+ if client and (client.title == name or client.machineIdentifier == name):
427
return client
428
429
raise NotFound(f'Unknown client name: {name}')
0 commit comments