Skip to content

Commit 8c26cc6

Browse files
authored
Merge pull request #303 from blacktwin/patch-1
additional attributes
2 parents 8f7e315 + 60fe55e commit 8c26cc6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

plexapi/media.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,12 @@ class Media(PlexObject):
2525
id (int): Plex ID of this media item (ex: 46184).
2626
has64bitOffsets (bool): True if video has 64 bit offsets (?).
2727
optimizedForStreaming (bool): True if video is optimized for streaming.
28+
target (str): Media version target name.
29+
title (str): Media version title.
2830
videoCodec (str): Video codec used within the video (ex: ac3).
2931
videoFrameRate (str): Video frame rate (ex: 24p).
3032
videoResolution (str): Video resolution (ex: sd).
33+
videoProfile (str): Video profile (ex: high).
3134
width (int): Width of the video in pixels (ex: 608).
3235
parts (list<:class:`~plexapi.media.MediaPart`>): List of MediaParts in this video.
3336
"""
@@ -46,8 +49,11 @@ def _loadData(self, data):
4649
self.id = cast(int, data.attrib.get('id'))
4750
self.has64bitOffsets = cast(bool, data.attrib.get('has64bitOffsets'))
4851
self.optimizedForStreaming = cast(bool, data.attrib.get('optimizedForStreaming'))
52+
self.target = data.attrib.get('target')
53+
self.title = data.attrib.get('title')
4954
self.videoCodec = data.attrib.get('videoCodec')
5055
self.videoFrameRate = data.attrib.get('videoFrameRate')
56+
self.videoProfile = data.attrib.get('videoProfile')
5157
self.videoResolution = data.attrib.get('videoResolution')
5258
self.width = cast(int, data.attrib.get('width'))
5359
self.parts = self.findItems(data, MediaPart)

0 commit comments

Comments
 (0)