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):
""" Return the first attribute in attrs that is not None. """
for attr in attrs:
value = self.__dict__.get(attr)
value = getattr(self, attr, None)
if value is not None:
return value

View file

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