mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-22 19:53:17 +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):
|
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
|
||||||
|
|
||||||
|
|
|
@ -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:
|
||||||
|
|
Loading…
Reference in a new issue