mirror of
https://github.com/pkkid/python-plexapi
synced 2025-02-16 21:08:27 +00:00
Function update timeline for base.py
Function to update the timeline for a payable item. With this the item will be showed in the now playing screen.
This commit is contained in:
parent
725bea090f
commit
00c21c6325
1 changed files with 12 additions and 0 deletions
|
@ -565,6 +565,18 @@ class Playable(object):
|
|||
time, state)
|
||||
self._server.query(key)
|
||||
self.reload()
|
||||
|
||||
def updateTimeline(self, time, state='stopped'):
|
||||
""" Set the timeline progress for this video.
|
||||
|
||||
Parameters:
|
||||
time (int): milliseconds watched
|
||||
state (string): state of the video, default 'stopped'
|
||||
"""
|
||||
key = '/:/timeline?ratingKey=%s&key=%s&identifier=com.plexapp.plugins.library&time=%d&state=%s' % (self.ratingKey, self.key,
|
||||
time, state)
|
||||
self._server.query(key)
|
||||
self.reload()
|
||||
|
||||
|
||||
@utils.registerPlexObject
|
||||
|
|
Loading…
Add table
Reference in a new issue