Skip to content

Commit 1589e28

Browse files
committed
Add logo property
1 parent 8a19428 commit 1589e28

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
@@ -412,11 +412,15 @@ def deleteArt(self):
412412
class LogoUrlMixin:
413413
""" Mixin for Plex objects that can have a logo url. """
414414

415+
@property
416+
def logo(self):
417+
""" Return the API path to the logo image. """
418+
return next((i.url for i in self.images if i.type == 'clearLogo'), None)
419+
415420
@property
416421
def logoUrl(self):
417422
""" Return the logo url for the Plex object. """
418-
image = next((i for i in self.images if i.type == 'clearLogo'), None)
419-
return self._server.url(image.url, includeToken=True) if image else None
423+
return self._server.url(self.logo, includeToken=True) if self.logo else None
420424

421425

422426
class LogoLockMixin:

0 commit comments

Comments
 (0)