mirror of
https://github.com/pkkid/python-plexapi
synced 2025-02-16 21:08:27 +00:00
commit
ba1f3a2b69
3 changed files with 21 additions and 1 deletions
|
@ -869,7 +869,7 @@ class PhotoSection(LibrarySection):
|
||||||
TYPE (str): 'photo'
|
TYPE (str): 'photo'
|
||||||
"""
|
"""
|
||||||
ALLOWED_FILTERS = ('all', 'iso', 'make', 'lens', 'aperture', 'exposure', 'device', 'resolution', 'place',
|
ALLOWED_FILTERS = ('all', 'iso', 'make', 'lens', 'aperture', 'exposure', 'device', 'resolution', 'place',
|
||||||
'originallyAvailableAt', 'addedAt', 'title', 'userRating')
|
'originallyAvailableAt', 'addedAt', 'title', 'userRating', 'tag', 'year')
|
||||||
ALLOWED_SORT = ('addedAt',)
|
ALLOWED_SORT = ('addedAt',)
|
||||||
TAG = 'Directory'
|
TAG = 'Directory'
|
||||||
TYPE = 'photo'
|
TYPE = 'photo'
|
||||||
|
|
|
@ -419,6 +419,25 @@ class Label(MediaTag):
|
||||||
FILTER = 'label'
|
FILTER = 'label'
|
||||||
|
|
||||||
|
|
||||||
|
@utils.registerPlexObject
|
||||||
|
class Tag(MediaTag):
|
||||||
|
""" Represents a single tag media tag.
|
||||||
|
|
||||||
|
Attributes:
|
||||||
|
TAG (str): 'tag'
|
||||||
|
FILTER (str): 'tag'
|
||||||
|
"""
|
||||||
|
TAG = 'Tag'
|
||||||
|
FILTER = 'tag'
|
||||||
|
|
||||||
|
def _loadData(self, data):
|
||||||
|
self._data = data
|
||||||
|
self.id = cast(int, data.attrib.get('id', 0))
|
||||||
|
self.filter = data.attrib.get('filter')
|
||||||
|
self.tag = data.attrib.get('tag')
|
||||||
|
self.title = self.tag
|
||||||
|
|
||||||
|
|
||||||
@utils.registerPlexObject
|
@utils.registerPlexObject
|
||||||
class Country(MediaTag):
|
class Country(MediaTag):
|
||||||
""" Represents a single Country media tag.
|
""" Represents a single Country media tag.
|
||||||
|
|
|
@ -117,6 +117,7 @@ class Photo(PlexPartialObject):
|
||||||
self.updatedAt = utils.toDatetime(data.attrib.get('updatedAt'))
|
self.updatedAt = utils.toDatetime(data.attrib.get('updatedAt'))
|
||||||
self.year = utils.cast(int, data.attrib.get('year'))
|
self.year = utils.cast(int, data.attrib.get('year'))
|
||||||
self.media = self.findItems(data, media.Media)
|
self.media = self.findItems(data, media.Media)
|
||||||
|
self.tag = self.findItems(data, media.Tag)
|
||||||
|
|
||||||
def photoalbum(self):
|
def photoalbum(self):
|
||||||
""" Return this photo's :class:`~plexapi.photo.Photoalbum`. """
|
""" Return this photo's :class:`~plexapi.photo.Photoalbum`. """
|
||||||
|
|
Loading…
Add table
Reference in a new issue