mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-26 13:40:22 +00:00
create augmentation method in video.Video
This commit is contained in:
parent
f36f549681
commit
c46aa3b5bb
1 changed files with 13 additions and 0 deletions
|
@ -88,6 +88,19 @@ class Video(PlexPartialObject):
|
|||
items.append(library.Hub(data=item, server=self._server))
|
||||
return items
|
||||
|
||||
def augmentation(self):
|
||||
""" Returns a list of :class:`~plexapi.library.Hub` objects.
|
||||
|
||||
augmentation returns hub items relating to online media sources
|
||||
such as Tidal Music "Track From {item}" or "Soundtrack of {item}"
|
||||
|
||||
"""
|
||||
|
||||
data = self._server.query(self.key + '?asyncAugmentMetadata=1')
|
||||
mediaContainer = MediaContainer(data=data, server=self._server)
|
||||
augmentationKey = mediaContainer.augmentationKey
|
||||
return self.fetchItems(augmentationKey)
|
||||
|
||||
def rate(self, rate):
|
||||
""" Rate video. """
|
||||
key = '/:/rate?key=%s&identifier=com.plexapp.plugins.library&rating=%s' % (self.ratingKey, rate)
|
||||
|
|
Loading…
Reference in a new issue