diff --git a/plexapi/video.py b/plexapi/video.py index b954b55a..8f5fdadb 100644 --- a/plexapi/video.py +++ b/plexapi/video.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from plexapi import media, utils, settings +from plexapi import media, utils, settings, library from plexapi.exceptions import BadRequest, NotFound from plexapi.base import Playable, PlexPartialObject from plexapi.compat import quote_plus, urlencode @@ -445,6 +445,16 @@ class Show(Video): return items + def hubs(self): + """ Returns a list of :class:`~plexapi.library.Hub` objects. """ + items = [] + data = self._server.query(self._details_key) + for item in data.iter('Related'): + for elem in item: + items.append(library.Hub(data=elem, server=self._server)) + + return items + def seasons(self, **kwargs): """ Returns a list of :class:`~plexapi.video.Season` objects. """ key = '/library/metadata/%s/children?excludeAllLeaves=1' % self.ratingKey