Add more stream attributes to plexapi

This commit is contained in:
JonnyWong16 2020-08-04 20:14:29 -07:00
parent eb63f89b1f
commit 588b1b1bc3
No known key found for this signature in database
GPG key ID: B1F1F9807184697A

View file

@ -261,6 +261,7 @@ class VideoStream(MediaPartStream):
def _loadData(self, data): def _loadData(self, data):
""" Load attribute values from Plex XML response. """ """ Load attribute values from Plex XML response. """
super(VideoStream, self)._loadData(data) super(VideoStream, self)._loadData(data)
self.anamorphic = data.attrib.get('anamorphic')
self.bitDepth = cast(int, data.attrib.get('bitDepth')) self.bitDepth = cast(int, data.attrib.get('bitDepth'))
self.bitrate = cast(int, data.attrib.get('bitrate')) self.bitrate = cast(int, data.attrib.get('bitrate'))
self.cabac = cast(int, data.attrib.get('cabac')) self.cabac = cast(int, data.attrib.get('cabac'))
@ -281,6 +282,8 @@ class VideoStream(MediaPartStream):
self.profile = data.attrib.get('profile') self.profile = data.attrib.get('profile')
self.refFrames = cast(int, data.attrib.get('refFrames')) self.refFrames = cast(int, data.attrib.get('refFrames'))
self.requiredBandwidths = data.attrib.get('requiredBandwidths') self.requiredBandwidths = data.attrib.get('requiredBandwidths')
self.pixelAspectRatio = data.attrib.get('pixelAspectRatio')
self.pixelFormat = data.attrib.get('pixelFormat')
self.scanType = data.attrib.get('scanType') self.scanType = data.attrib.get('scanType')
self.streamIdentifier = cast(int, data.attrib.get('streamIdentifier')) self.streamIdentifier = cast(int, data.attrib.get('streamIdentifier'))
self.width = cast(int, data.attrib.get('width')) self.width = cast(int, data.attrib.get('width'))
@ -353,6 +356,7 @@ class SubtitleStream(MediaPartStream):
self.container = data.attrib.get('container') self.container = data.attrib.get('container')
self.forced = cast(bool, data.attrib.get('forced', '0')) self.forced = cast(bool, data.attrib.get('forced', '0'))
self.format = data.attrib.get('format') self.format = data.attrib.get('format')
self.headerCompression = data.attrib.get('headerCompression')
self.key = data.attrib.get('key') self.key = data.attrib.get('key')
self.requiredBandwidths = data.attrib.get('requiredBandwidths') self.requiredBandwidths = data.attrib.get('requiredBandwidths')