Add Playlist thumb alias to composite

This commit is contained in:
JonnyWong16 2021-02-14 19:58:03 -08:00
parent 9fa51cee2a
commit b0780aaec8
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
2 changed files with 6 additions and 1 deletions

View file

@ -232,7 +232,7 @@ class PlexObject(object):
def firstAttr(self, *attrs): def firstAttr(self, *attrs):
""" Return the first attribute in attrs that is not None. """ """ Return the first attribute in attrs that is not None. """
for attr in attrs: for attr in attrs:
value = self.__dict__.get(attr) value = getattr(self, attr, None)
if value is not None: if value is not None:
return value return value

View file

@ -63,6 +63,11 @@ class Playlist(PlexPartialObject, Playable, ArtMixin, PosterMixin):
for item in self.items(): for item in self.items():
yield item yield item
@property
def thumb(self):
""" Alias to self.composite. """
return self.composite
@property @property
def metadataType(self): def metadataType(self):
if self.isVideo: if self.isVideo: