Skip to content

Commit a394db6

Browse files
authored
additional attributes
target, title and video profile. Optimizing items through Plex now allows for adding a title to the version. Target and title are the version name and seem to be the same value.
1 parent 8f7e315 commit a394db6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

plexapi/media.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ 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).
@@ -46,8 +48,11 @@ def _loadData(self, data):
4648
self.id = cast(int, data.attrib.get('id'))
4749
self.has64bitOffsets = cast(bool, data.attrib.get('has64bitOffsets'))
4850
self.optimizedForStreaming = cast(bool, data.attrib.get('optimizedForStreaming'))
51+
self.target = data.attrib.get('target')
52+
self.title = data.attrib.get('title')
4953
self.videoCodec = data.attrib.get('videoCodec')
5054
self.videoFrameRate = data.attrib.get('videoFrameRate')
55+
self.videoProfile = data.attrib.get('videoProfile')
5156
self.videoResolution = data.attrib.get('videoResolution')
5257
self.width = cast(int, data.attrib.get('width'))
5358
self.parts = self.findItems(data, MediaPart)

0 commit comments

Comments
 (0)