Skip to content

Commit 2ab3b61

Browse files
committed
add mediaType keyword to agents method
Thanks @JonnyWong16
1 parent c061986 commit 2ab3b61

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

plexapi/server.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,11 @@ def account(self):
184184
data = self.query(Account.key)
185185
return Account(self, data)
186186

187-
def agents(self):
187+
def agents(self, mediaType=None):
188188
""" Returns the `:class:`~plexapi.media.Agent` objects this server has available. """
189189
key = '/system/agents'
190+
if mediaType:
191+
key += '?mediaType=%s' % mediaType
190192
return self.fetchItems(key)
191193

192194
def createToken(self, type='delegation', scope='all'):

0 commit comments

Comments
 (0)