mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-22 11:43:13 +00:00
Add Playlist thumb alias to composite
This commit is contained in:
parent
9fa51cee2a
commit
b0780aaec8
2 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue