We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
updateProgress
Video
1 parent c3dc913 commit f5af5d0Copy full SHA for f5af5d0
plexapi/video.py
@@ -77,6 +77,21 @@ def markUnwatched(self):
77
self._server.query(key)
78
self.reload()
79
80
+ def updateProgress(self, time, state='stopped'):
81
+ """ Set the watched progress for this video.
82
+
83
+ Note that setting the time to 0 will not work.
84
+ Use `markWatched` or `markUnwatched` to achieve
85
+ that goal.
86
87
+ Parameters:
88
+ time (int): milliseconds watched
89
+ state (string): state of the video, default 'stopped'
90
+ """
91
+ key = '/:/progress?key=%s&identifier=com.plexapp.plugins.library&time=%d&state=%s' % (self.ratingKey, time, state)
92
+ self._server.query(key)
93
+ self.reload()
94
95
96
@utils.registerPlexObject
97
class Movie(Video, Playable):
0 commit comments