From a2ef4a5564a5d7d83835c8ac274ac4863656ee92 Mon Sep 17 00:00:00 2001 From: blacktwin Date: Sun, 24 May 2020 22:57:02 -0400 Subject: [PATCH] create hasIntroMarker method to quickly identify if an episode has an intro marker --- plexapi/video.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plexapi/video.py b/plexapi/video.py index a270af5f..b120ee3f 100644 --- a/plexapi/video.py +++ b/plexapi/video.py @@ -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)