From 4a463f04f1b346795fdf9291b985d37deb911084 Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Mon, 25 Jan 2021 09:23:08 -0800 Subject: [PATCH] Add thumbUrl and artUrl to plexapi Collections * pkkid/python-plexapi#651 --- lib/plexapi/library.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/plexapi/library.py b/lib/plexapi/library.py index e27df987..ce0e0ec6 100644 --- a/lib/plexapi/library.py +++ b/lib/plexapi/library.py @@ -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.