@@ -37,7 +37,7 @@ class Media(PlexObject):
3737 videoResolution (str): The video resolution of the media (ex: sd).
3838 width (int): The width of the video in pixels (ex: 608).
3939
40- < Photo_only_attributes> : The following attributes are only available for photos.
40+ Photo_only_attributes: The following attributes are only available for photos.
4141
4242 * aperture (str): The aperture used to take the photo.
4343 * exposure (str): The exposure used to take the photo.
@@ -74,13 +74,13 @@ def _loadData(self, data):
7474 self .width = utils .cast (int , data .attrib .get ('width' ))
7575 self .uuid = data .attrib .get ('uuid' )
7676
77- if self . _isChildOf ( etag = ' Photo' ):
78- self .aperture = data .attrib .get ('aperture' )
79- self .exposure = data .attrib .get ('exposure' )
80- self .iso = utils .cast (int , data .attrib .get ('iso' ))
81- self .lens = data .attrib .get ('lens' )
82- self .make = data .attrib .get ('make' )
83- self .model = data .attrib .get ('model' )
77+ # Photo only attributes
78+ self .aperture = data .attrib .get ('aperture' )
79+ self .exposure = data .attrib .get ('exposure' )
80+ self .iso = utils .cast (int , data .attrib .get ('iso' ))
81+ self .lens = data .attrib .get ('lens' )
82+ self .make = data .attrib .get ('make' )
83+ self .model = data .attrib .get ('model' )
8484
8585 parent = self ._parent ()
8686 self ._parentKey = parent .key
@@ -158,11 +158,8 @@ def _loadData(self, data):
158158 self .videoProfile = data .attrib .get ('videoProfile' )
159159
160160 def _buildStreams (self , data ):
161- streams = []
162- for cls in (VideoStream , AudioStream , SubtitleStream , LyricStream ):
163- items = self .findItems (data , cls , streamType = cls .STREAMTYPE )
164- streams .extend (items )
165- return streams
161+ """ Returns a list of :class:`~plexapi.media.MediaPartStream` objects in this MediaPart. """
162+ return self .findItems (data )
166163
167164 @property
168165 def hasPreviewThumbnails (self ):
@@ -384,7 +381,7 @@ class AudioStream(MediaPartStream):
384381 samplingRate (int): The sampling rate of the audio stream (ex: xxx)
385382 streamIdentifier (int): The stream identifier of the audio stream.
386383
387- < Track_only_attributes> : The following attributes are only available for tracks.
384+ Track_only_attributes: The following attributes are only available for tracks.
388385
389386 * albumGain (float): The gain for the album.
390387 * albumPeak (float): The peak for the album.
@@ -411,16 +408,16 @@ def _loadData(self, data):
411408 self .samplingRate = utils .cast (int , data .attrib .get ('samplingRate' ))
412409 self .streamIdentifier = utils .cast (int , data .attrib .get ('streamIdentifier' ))
413410
414- if self . _isChildOf ( etag = ' Track' ):
415- self .albumGain = utils .cast (float , data .attrib .get ('albumGain' ))
416- self .albumPeak = utils .cast (float , data .attrib .get ('albumPeak' ))
417- self .albumRange = utils .cast (float , data .attrib .get ('albumRange' ))
418- self .endRamp = data .attrib .get ('endRamp' )
419- self .gain = utils .cast (float , data .attrib .get ('gain' ))
420- self .loudness = utils .cast (float , data .attrib .get ('loudness' ))
421- self .lra = utils .cast (float , data .attrib .get ('lra' ))
422- self .peak = utils .cast (float , data .attrib .get ('peak' ))
423- self .startRamp = data .attrib .get ('startRamp' )
411+ # Track only attributes
412+ self .albumGain = utils .cast (float , data .attrib .get ('albumGain' ))
413+ self .albumPeak = utils .cast (float , data .attrib .get ('albumPeak' ))
414+ self .albumRange = utils .cast (float , data .attrib .get ('albumRange' ))
415+ self .endRamp = data .attrib .get ('endRamp' )
416+ self .gain = utils .cast (float , data .attrib .get ('gain' ))
417+ self .loudness = utils .cast (float , data .attrib .get ('loudness' ))
418+ self .lra = utils .cast (float , data .attrib .get ('lra' ))
419+ self .peak = utils .cast (float , data .attrib .get ('peak' ))
420+ self .startRamp = data .attrib .get ('startRamp' )
424421
425422 def setSelected (self ):
426423 """ Sets this audio stream as the selected audio stream.
0 commit comments