mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-22 11:43:13 +00:00
create settings method for LibrarySection
return current library settings
This commit is contained in:
parent
8d334ce47f
commit
1d05304643
1 changed files with 7 additions and 0 deletions
|
@ -4,6 +4,7 @@ from plexapi.base import PlexObject
|
|||
from plexapi.compat import unquote, urlencode, quote_plus
|
||||
from plexapi.media import MediaTag
|
||||
from plexapi.exceptions import BadRequest, NotFound
|
||||
from plexapi.settings import Setting
|
||||
|
||||
|
||||
class Library(PlexObject):
|
||||
|
@ -401,6 +402,12 @@ class LibrarySection(PlexObject):
|
|||
key = '/library/sections/%s/all%s' % (self.key, sortStr)
|
||||
return self.fetchItems(key, **kwargs)
|
||||
|
||||
def settings(self):
|
||||
""" Returns a list of all library settings. """
|
||||
key = '/library/sections/%s/prefs' % self.key
|
||||
data = self._server.query(key)
|
||||
return self.findItems(data, cls=Setting)
|
||||
|
||||
def onDeck(self):
|
||||
""" Returns a list of media items on deck from this library section. """
|
||||
key = '/library/sections/%s/onDeck' % self.key
|
||||
|
|
Loading…
Reference in a new issue