mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-23 04:03:05 +00:00
Added cast/todatetime and missing minYear
This commit is contained in:
parent
4e27f6d8a8
commit
b06c417706
1 changed files with 7 additions and 6 deletions
|
@ -735,16 +735,17 @@ class Collections(PlexObject):
|
||||||
TYPE = 'collection'
|
TYPE = 'collection'
|
||||||
|
|
||||||
def _loadData(self, data):
|
def _loadData(self, data):
|
||||||
self.ratingKey = data.attrib.get('ratingKey')
|
self.ratingKey = utils.cast(int, data.attrib.get('ratingKey'))
|
||||||
self.key = data.attrib.get('key')
|
self.key = data.attrib.get('key')
|
||||||
self.type = data.attrib.get('type')
|
self.type = data.attrib.get('type')
|
||||||
self.title = data.attrib.get('title')
|
self.title = data.attrib.get('title')
|
||||||
self.subtype = data.attrib.get('subtype')
|
self.subtype = data.attrib.get('subtype')
|
||||||
self.summary = data.attrib.get('summary')
|
self.summary = data.attrib.get('summary')
|
||||||
self.index = data.attrib.get('index')
|
self.index = utils.cast(int, data.attrib.get('index'))
|
||||||
self.thumb = data.attrib.get('thumb')
|
self.thumb = data.attrib.get('thumb')
|
||||||
self.addedAt = data.attrib.get('addedAt')
|
self.addedAt = utils.toDatetime(data.attrib.get('addedAt'))
|
||||||
self.updatedAt = data.attrib.get('updatedAt')
|
self.updatedAt = utils.toDatetime(data.attrib.get('updatedAt'))
|
||||||
self.childCount = data.attrib.get('childCount')
|
self.childCount = utils.cast(int, data.attrib.get('childCount'))
|
||||||
self.maxYear = data.attrib.get('maxYear')
|
self.minYear = utils.cast(int, data.attrib.get('minYear'))
|
||||||
|
self.maxYear = utils.cast(int, data.attrib.get('maxYear'))
|
||||||
self.children = self.fetchItems(self.key)
|
self.children = self.fetchItems(self.key)
|
||||||
|
|
Loading…
Reference in a new issue