@@ -767,7 +767,9 @@ class Episode(Video, Playable, ArtMixin, PosterMixin, RatingMixin,
767767 parentThumb (str): URL to season thumbnail image (/library/metadata/<parentRatingKey>/thumb/<thumbid>).
768768 parentTitle (str): Name of the season for the episode.
769769 parentYear (int): Year the season was released.
770+ producers (List<:class:`~plexapi.media.Producer`>): List of producers objects.
770771 rating (float): Episode rating (7.9; 9.8; 8.1).
772+ roles (List<:class:`~plexapi.media.Role`>): List of role objects.
771773 skipParent (bool): True if the show's seasons are set to hidden.
772774 viewOffset (int): View offset in milliseconds.
773775 writers (List<:class:`~plexapi.media.Writer`>): List of writers objects.
@@ -809,7 +811,9 @@ def _loadData(self, data):
809811 self .parentThumb = data .attrib .get ('parentThumb' )
810812 self .parentTitle = data .attrib .get ('parentTitle' )
811813 self .parentYear = utils .cast (int , data .attrib .get ('parentYear' ))
814+ self .producers = self .findItems (data , media .Producer )
812815 self .rating = utils .cast (float , data .attrib .get ('rating' ))
816+ self .roles = self .findItems (data , media .Role )
813817 self .skipParent = utils .cast (bool , data .attrib .get ('skipParent' , '0' ))
814818 self .viewOffset = utils .cast (int , data .attrib .get ('viewOffset' , 0 ))
815819 self .writers = self .findItems (data , media .Writer )
@@ -838,6 +842,11 @@ def _prettyfilename(self):
838842 """ Returns a human friendly filename. """
839843 return '%s.%s' % (self .grandparentTitle .replace (' ' , '.' ), self .seasonEpisode )
840844
845+ @property
846+ def actors (self ):
847+ """ Alias to self.roles. """
848+ return self .roles
849+
841850 @property
842851 def locations (self ):
843852 """ This does not exist in plex xml response but is added to have a common
@@ -865,6 +874,11 @@ def seasonEpisode(self):
865874 """ Returns the s00e00 string containing the season and episode numbers. """
866875 return 's%se%s' % (str (self .seasonNumber ).zfill (2 ), str (self .episodeNumber ).zfill (2 ))
867876
877+ @property
878+ def hasCommercialMarker (self ):
879+ """ Returns True if the episode has a commercial marker in the xml. """
880+ return any (marker .type == 'commercial' for marker in self .markers )
881+
868882 @property
869883 def hasIntroMarker (self ):
870884 """ Returns True if the episode has an intro marker in the xml. """
0 commit comments