New method for grandparent ratingKey

This commit is contained in:
croneter 2018-02-21 20:23:43 +01:00
parent d4b5dc99a1
commit faacbc6108

View file

@ -542,6 +542,13 @@ class API(object):
""" """
return self.item.get('parentRatingKey') return self.item.get('parentRatingKey')
def grandparent_id(self):
"""
Returns the ratingKey for the corresponding grandparent, e.g. a TV show
for episodes, or None
"""
return self.item.get('grandparentRatingKey')
def episode_data(self): def episode_data(self):
""" """
Call on a single episode. Call on a single episode.