mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-20 21:33:18 -07:00
Add art and thumb url to plexapi collections
This commit is contained in:
parent
7eedb14834
commit
75cdc2c5e8
1 changed files with 11 additions and 0 deletions
|
@ -1092,6 +1092,7 @@ class Collections(PlexObject):
|
||||||
def _loadData(self, data):
|
def _loadData(self, data):
|
||||||
self.ratingKey = utils.cast(int, data.attrib.get('ratingKey'))
|
self.ratingKey = utils.cast(int, data.attrib.get('ratingKey'))
|
||||||
self._details_key = "/library/metadata/%s%s" % (self.ratingKey, self._include)
|
self._details_key = "/library/metadata/%s%s" % (self.ratingKey, self._include)
|
||||||
|
self.art = data.attrib.get('art')
|
||||||
self.contentRating = data.attrib.get('contentRating')
|
self.contentRating = data.attrib.get('contentRating')
|
||||||
self.guid = data.attrib.get('guid')
|
self.guid = data.attrib.get('guid')
|
||||||
self.key = data.attrib.get('key')
|
self.key = data.attrib.get('key')
|
||||||
|
@ -1118,6 +1119,16 @@ class Collections(PlexObject):
|
||||||
def children(self):
|
def children(self):
|
||||||
return self.fetchItems(self.key)
|
return self.fetchItems(self.key)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def thumbUrl(self):
|
||||||
|
""" Return the thumbnail url for the collection."""
|
||||||
|
return self._server.url(self.thumb, includeToken=True) if self.thumb else None
|
||||||
|
|
||||||
|
@property
|
||||||
|
def artUrl(self):
|
||||||
|
""" Return the art url for the collection."""
|
||||||
|
return self._server.url(self.art, includeToken=True) if self.art else None
|
||||||
|
|
||||||
def __len__(self):
|
def __len__(self):
|
||||||
return self.childCount
|
return self.childCount
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue