mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-22 11:43:13 +00:00
create hasIntroMarker method to quickly identify if an episode has an intro marker
This commit is contained in:
parent
5e3dff4e32
commit
a2ef4a5564
1 changed files with 7 additions and 0 deletions
|
@ -740,6 +740,13 @@ class Episode(Playable, Video):
|
|||
""" Returns the s00e00 string containing the season and episode. """
|
||||
return 's%se%s' % (str(self.seasonNumber).zfill(2), str(self.index).zfill(2))
|
||||
|
||||
@property
|
||||
def hasIntroMarker(self):
|
||||
""" Returns True if this episode has an intro marker in the xml. """
|
||||
if not self.isFullObject():
|
||||
self.reload()
|
||||
return bool(self.markers)
|
||||
|
||||
def season(self):
|
||||
"""" Return this episodes :func:`~plexapi.video.Season`.. """
|
||||
return self.fetchItem(self.parentKey)
|
||||
|
|
Loading…
Reference in a new issue