create MediaContainer class in base.py

This commit is contained in:
blacktwin 2020-07-15 16:09:05 -04:00
parent 6f37a7b8c2
commit 451b689c0d

View file

@ -766,3 +766,26 @@ class Release(PlexObject):
self.fixed = data.attrib.get('fixed') self.fixed = data.attrib.get('fixed')
self.downloadURL = data.attrib.get('downloadURL') self.downloadURL = data.attrib.get('downloadURL')
self.state = data.attrib.get('state') self.state = data.attrib.get('state')
class MediaContainer(PlexObject):
""" Represents a single MediaContainer.
Attributes:
TAG (str): 'MediaContainer'
"""
TAG = 'MediaContainer'
def _loadData(self, data):
self._data = data
self.allowSync = utils.cast(int, data.attrib.get('allowSync'))
self.librarySectionID = data.attrib.get('librarySectionID')
self.librarySectionTitle = data.attrib.get('librarySectionTitle')
self.librarySectionUUID = data.attrib.get('librarySectionUUID')
self.augmentationKey = data.attrib.get('augmentationKey')
self.identifier = data.attrib.get('identifier')
self.mediaTagVersion = data.attrib.get('mediaTagVersion')
self.mediaTagPrefix = data.attrib.get('mediaTagPrefix')
self.mediaTagVersion = data.attrib.get('mediaTagVersion')
self.size = utils.cast(int, data.attrib.get('size'))