@@ -735,16 +735,17 @@ class Collections(PlexObject):
735735 TYPE = 'collection'
736736
737737 def _loadData (self , data ):
738- self .ratingKey = data .attrib .get ('ratingKey' )
738+ self .ratingKey = utils . cast ( int , data .attrib .get ('ratingKey' ) )
739739 self .key = data .attrib .get ('key' )
740740 self .type = data .attrib .get ('type' )
741741 self .title = data .attrib .get ('title' )
742742 self .subtype = data .attrib .get ('subtype' )
743743 self .summary = data .attrib .get ('summary' )
744- self .index = data .attrib .get ('index' )
744+ self .index = utils . cast ( int , data .attrib .get ('index' ) )
745745 self .thumb = data .attrib .get ('thumb' )
746- self .addedAt = data .attrib .get ('addedAt' )
747- self .updatedAt = data .attrib .get ('updatedAt' )
748- self .childCount = data .attrib .get ('childCount' )
749- self .maxYear = data .attrib .get ('maxYear' )
746+ self .addedAt = utils .toDatetime (data .attrib .get ('addedAt' ))
747+ self .updatedAt = utils .toDatetime (data .attrib .get ('updatedAt' ))
748+ self .childCount = utils .cast (int , data .attrib .get ('childCount' ))
749+ self .minYear = utils .cast (int , data .attrib .get ('minYear' ))
750+ self .maxYear = utils .cast (int , data .attrib .get ('maxYear' ))
750751 self .children = self .fetchItems (self .key )
0 commit comments