Add thumbUrl and artUrl properties to collections

This commit is contained in:
JonnyWong16 2021-01-25 09:14:25 -08:00
parent d3fbc4f25b
commit 5c41bf01ac
No known key found for this signature in database
GPG key ID: B1F1F9807184697A

View file

@ -1595,7 +1595,17 @@ class Collections(PlexPartialObject):
@deprecated('use "items" instead')
def children(self):
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 item(self, title):
""" Returns the item in the collection that matches the specified title.