We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 90aa3a5 commit 235232fCopy full SHA for 235232f
1 file changed
plexapi/mixins.py
@@ -523,11 +523,15 @@ def setPoster(self, poster):
523
class SquareArtUrlMixin:
524
""" Mixin for Plex objects that can have a square art url. """
525
526
+ @property
527
+ def squareArt(self):
528
+ """ Return the API path to the square art image. """
529
+ return next((i.url for i in self.images if i.type == 'backgroundSquare'), None)
530
+
531
@property
532
def squareArtUrl(self):
533
""" Return the square art url for the Plex object. """
- image = next((i for i in self.images if i.type == 'squareArt'), None)
- return self._server.url(image.url, includeToken=True) if image else None
534
+ return self._server.url(self.squareArt, includeToken=True) if self.squareArt else None
535
536
537
class SquareArtLockMixin:
0 commit comments