mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-10 06:04:15 +00:00
create preferences method
This commit is contained in:
parent
4db38e6832
commit
6a69fe4810
1 changed files with 10 additions and 0 deletions
|
@ -435,6 +435,16 @@ class Show(Video):
|
|||
""" Returns True if this show is fully watched. """
|
||||
return bool(self.viewedLeafCount == self.leafCount)
|
||||
|
||||
def preferences(self):
|
||||
""" Returns a list of :class:`~plexapi.settings.Preferences` objects. """
|
||||
items = []
|
||||
data = self._server.query(self._details_key)
|
||||
for item in data.iter('Preferences'):
|
||||
for elem in item:
|
||||
items.append(settings.Preferences(data=elem, server=self._server))
|
||||
|
||||
return items
|
||||
|
||||
def seasons(self, **kwargs):
|
||||
""" Returns a list of :class:`~plexapi.video.Season` objects. """
|
||||
key = '/library/metadata/%s/children?excludeAllLeaves=1' % self.ratingKey
|
||||
|
|
Loading…
Reference in a new issue