@@ -30,7 +30,7 @@ def _loadData(self, data):
3030 self ._data = data
3131 self .listType = 'video'
3232 self .addedAt = utils .toDatetime (data .attrib .get ('addedAt' ))
33- self .key = data .attrib .get ('key' )
33+ self .key = data .attrib .get ('key' , '' )
3434 self .lastViewedAt = utils .toDatetime (data .attrib .get ('lastViewedAt' ))
3535 self .librarySectionID = data .attrib .get ('librarySectionID' )
3636 self .ratingKey = utils .cast (int , data .attrib .get ('ratingKey' ))
@@ -79,11 +79,11 @@ def markUnwatched(self):
7979
8080
8181@utils .registerPlexObject
82- class Movie (Video , Playable ):
82+ class Movie (Playable , Video ):
8383 """ Represents a single Movie.
8484
8585 Attributes:
86- TAG (str): 'Diectory '
86+ TAG (str): 'Video '
8787 TYPE (str): 'movie'
8888 art (str): Key to movie artwork (/library/metadata/<ratingkey>/art/<artid>)
8989 audienceRating (float): Audience rating (usually from Rotten Tomatoes).
@@ -111,14 +111,21 @@ class Movie(Video, Playable):
111111 producers (List<:class:`~plexapi.media.Producer`>): List of producers objects.
112112 roles (List<:class:`~plexapi.media.Role`>): List of role objects.
113113 writers (List<:class:`~plexapi.media.Writer`>): List of writers objects.
114+ chapters (List<:class:`~plexapi.media.Chapter`>): List of Chapter objects.
115+ similar (List<:class:`~plexapi.media.Similar`>): List of Similar objects.
114116 """
115117 TAG = 'Video'
116118 TYPE = 'movie'
119+ _include = ('?checkFiles=1&includeExtras=1&includeRelated=1'
120+ '&includeOnDeck=1&includeChapters=1&includePopularLeaves=1'
121+ '&includeConcerts=1&includePreferences=1' )
117122
118123 def _loadData (self , data ):
119124 """ Load attribute values from Plex XML response. """
120125 Video ._loadData (self , data )
121126 Playable ._loadData (self , data )
127+
128+ self ._details_key = self .key + self ._include
122129 self .art = data .attrib .get ('art' )
123130 self .audienceRating = utils .cast (float , data .attrib .get ('audienceRating' ))
124131 self .audienceRatingImage = data .attrib .get ('audienceRatingImage' )
@@ -147,6 +154,8 @@ def _loadData(self, data):
147154 self .roles = self .findItems (data , media .Role )
148155 self .writers = self .findItems (data , media .Writer )
149156 self .labels = self .findItems (data , media .Label )
157+ self .chapters = self .findItems (data , media .Chapter )
158+ self .similar = self .findItems (data , media .Similar )
150159
151160 @property
152161 def actors (self ):
@@ -204,7 +213,7 @@ class Show(Video):
204213 """ Represents a single Show (including all seasons and episodes).
205214
206215 Attributes:
207- TAG (str): 'Diectory '
216+ TAG (str): 'Directory '
208217 TYPE (str): 'show'
209218 art (str): Key to show artwork (/library/metadata/<ratingkey>/art/<artid>)
210219 banner (str): Key to banner artwork (/library/metadata/<ratingkey>/art/<artid>)
@@ -223,6 +232,7 @@ class Show(Video):
223232 year (int): Year the show was released.
224233 genres (List<:class:`~plexapi.media.Genre`>): List of genre objects.
225234 roles (List<:class:`~plexapi.media.Role`>): List of role objects.
235+ similar (List<:class:`~plexapi.media.Similar`>): List of Similar objects.
226236 """
227237 TAG = 'Directory'
228238 TYPE = 'show'
@@ -255,6 +265,7 @@ def _loadData(self, data):
255265 self .genres = self .findItems (data , media .Genre )
256266 self .roles = self .findItems (data , media .Role )
257267 self .labels = self .findItems (data , media .Label )
268+ self .similar = self .findItems (data , media .Similar )
258269
259270 @property
260271 def actors (self ):
@@ -341,7 +352,7 @@ class Season(Video):
341352 """ Represents a single Show Season (including all episodes).
342353
343354 Attributes:
344- TAG (str): 'Diectory '
355+ TAG (str): 'Directory '
345356 TYPE (str): 'season'
346357 leafCount (int): Number of episodes in season.
347358 index (int): Season number.
@@ -437,11 +448,11 @@ def download(self, savepath=None, keep_orginal_name=False, **kwargs):
437448
438449
439450@utils .registerPlexObject
440- class Episode (Video , Playable ):
451+ class Episode (Playable , Video ):
441452 """ Represents a single Shows Episode.
442453
443454 Attributes:
444- TAG (str): 'Diectory '
455+ TAG (str): 'Video '
445456 TYPE (str): 'episode'
446457 art (str): Key to episode artwork (/library/metadata/<ratingkey>/art/<artid>)
447458 chapterSource (str): Unknown (media).
@@ -471,11 +482,15 @@ class Episode(Video, Playable):
471482 """
472483 TAG = 'Video'
473484 TYPE = 'episode'
485+ _include = ('?checkFiles=1&includeExtras=1&includeRelated=1'
486+ '&includeOnDeck=1&includeChapters=1&includePopularLeaves=1'
487+ '&includeConcerts=1&includePreferences=1' )
474488
475489 def _loadData (self , data ):
476490 """ Load attribute values from Plex XML response. """
477491 Video ._loadData (self , data )
478492 Playable ._loadData (self , data )
493+ self ._details_key = self .key + self ._include
479494 self ._seasonNumber = None # cached season number
480495 self .art = data .attrib .get ('art' )
481496 self .chapterSource = data .attrib .get ('chapterSource' )
@@ -504,6 +519,7 @@ def _loadData(self, data):
504519 self .writers = self .findItems (data , media .Writer )
505520 self .labels = self .findItems (data , media .Label )
506521 self .collections = self .findItems (data , media .Collection )
522+ self .chapters = self .findItems (data , media .Chapter )
507523
508524 def __repr__ (self ):
509525 return '<%s>' % ':' .join ([p for p in [
0 commit comments