Skip to content

Commit 4f67155

Browse files
authored
Add logo propery
1 parent e330dd8 commit 4f67155

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

plexapi/mixins.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,11 +406,15 @@ def setArt(self, art):
406406
class LogoUrlMixin:
407407
""" Mixin for Plex objects that can have a logo url. """
408408

409+
@property
410+
def logo(self):
411+
""" Return the API path to the logo image. """
412+
return next((i.url for i in self.images if i.type == 'clearLogo'), None)
413+
409414
@property
410415
def logoUrl(self):
411416
""" Return the logo url for the Plex object. """
412-
image = next((i for i in self.images if i.type == 'clearLogo'), None)
413-
return self._server.url(image.url, includeToken=True) if image else None
417+
return self._server.url(self.logo, includeToken=True) if self.logo else None
414418

415419

416420
class LogoLockMixin:

0 commit comments

Comments
 (0)