Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions plexapi/media.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ class AudioStream(MediaPartStream):
audioChannelLayout (str): The audio channel layout of the audio stream (ex: 5.1(side)).
bitDepth (int): The bit depth of the audio stream (ex: 16).
bitrateMode (str): The bitrate mode of the audio stream (ex: cbr).
canNormalizeLoudness (bool): True if the audio stream can be normalized for loudness.
channels (int): The number of audio channels of the audio stream (ex: 6).
duration (int): The duration of audio stream in milliseconds.
profile (str): The profile of the audio stream.
Expand Down Expand Up @@ -395,6 +396,7 @@ def _loadData(self, data):
self.audioChannelLayout = data.attrib.get('audioChannelLayout')
self.bitDepth = utils.cast(int, data.attrib.get('bitDepth'))
self.bitrateMode = data.attrib.get('bitrateMode')
self.canNormalizeLoudness = utils.cast(bool, data.attrib.get('canNormalizeLoudness', '0'))
self.channels = utils.cast(int, data.attrib.get('channels'))
self.duration = utils.cast(int, data.attrib.get('duration'))
self.profile = data.attrib.get('profile')
Expand Down
1 change: 1 addition & 0 deletions tests/test_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ def test_video_Movie_attrs(movies): # noqa: C901
assert audio.bitDepth is None
assert utils.is_int(audio.bitrate)
assert audio.bitrateMode is None
assert audio.canNormalizeLoudness in (None, False)
assert audio.channels in utils.AUDIOCHANNELS
assert audio.codec in utils.CODECS
assert audio.default is True
Expand Down
Loading