Skip to content

Commit cfbde38

Browse files
committed
create _settings method to capture agent setting information
1 parent 46e8b8e commit cfbde38

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

plexapi/media.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
from plexapi import log, utils
2+
from plexapi import log, utils, settings
33
from plexapi.base import PlexObject
44
from plexapi.exceptions import BadRequest
55
from plexapi.utils import cast
@@ -675,4 +675,9 @@ def _loadData(self, data):
675675
self.hasPrefs = data.attrib.get('hasPrefs')
676676
self.identifier = data.attrib.get('identifier')
677677
self.primary = data.attrib.get('primary')
678-
self.shortIdentifier = self.identifier.rsplit('.', 1)[1]
678+
self.shortIdentifier = self.identifier.rsplit('.', 1)[1]
679+
680+
def _settings(self):
681+
key = '/:/plugins/%s/prefs' % self.identifier
682+
data = self._server.query(key)
683+
return self.findItems(data, cls=settings.Setting)

0 commit comments

Comments
 (0)