From faacbc6108af97c617cf9430a997307400aa9af7 Mon Sep 17 00:00:00 2001 From: croneter Date: Wed, 21 Feb 2018 20:23:43 +0100 Subject: [PATCH] New method for grandparent ratingKey --- resources/lib/PlexAPI.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/resources/lib/PlexAPI.py b/resources/lib/PlexAPI.py index 019c51ef..49346f60 100644 --- a/resources/lib/PlexAPI.py +++ b/resources/lib/PlexAPI.py @@ -542,6 +542,13 @@ class API(object): """ 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): """ Call on a single episode.