Fix collection children

This commit is contained in:
JonnyWong16 2020-12-04 11:18:31 -08:00
parent d5701aa8c4
commit a341cdad5b
No known key found for this signature in database
GPG key ID: B1F1F9807184697A

View file

@ -1478,9 +1478,10 @@ class Collections(PlexPartialObject):
self.type = data.attrib.get('type')
self.updatedAt = utils.toDatetime(data.attrib.get('updatedAt'))
@property
def children(self):
return self.fetchItems(self.key)
""" Returns a list of all items in the collection. """
key = '/library/metadata/%s/children' % self.ratingKey
return self.fetchItems(key)
def __len__(self):
return self.childCount