Skip to content

Commit 8c78fba

Browse files
authored
add attributes
adding attributes for exists and accessible.
1 parent db6a670 commit 8c78fba

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

plexapi/media.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ class MediaPart(PlexObject):
8585
key (str): Key used to access this media part (ex: /library/parts/46618/1389985872/file.avi).
8686
size (int): Size of this file in bytes (ex: 733884416).
8787
streams (list<:class:`~plexapi.media.MediaPartStream`>): List of streams in this media part.
88+
exists (bool): Determine if file exists
89+
accessible (bool): Determine if file is accessible
8890
"""
8991
TAG = 'Part'
9092

@@ -104,6 +106,8 @@ def _loadData(self, data):
104106
self.syncState = data.attrib.get('syncState')
105107
self.videoProfile = data.attrib.get('videoProfile')
106108
self.streams = self._buildStreams(data)
109+
self.exists = cast(bool, data.attrib.get('exists'))
110+
self.accessible = cast(bool, data.attrib.get('accessible'))
107111

108112
def _buildStreams(self, data):
109113
streams = []

0 commit comments

Comments
 (0)