Skip to content

Commit

Permalink
using JSON-RPC call for player seeking
Browse files Browse the repository at this point in the history
fixes ##446
  • Loading branch information
Sandmann79 committed Apr 11, 2020
1 parent 4984d8f commit c2a35f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugin.video.amazon-test/addon.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.amazon-test"
name="Amazon VOD"
version="0.8.3"
version="0.8.4~beta"
provider-name="Sandmann79, Varstahl">
<requires>
<import addon="xbmc.python" version="2.24.0"/>
Expand Down
5 changes: 3 additions & 2 deletions plugin.video.amazon-test/resources/lib/playback.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,9 +707,10 @@ def hide(self):
def onControl(self, control):
if control.getId() == self.skip_button.getId() and self.player.isPlayingVideo():
Log('Seeking to (+3): {}'.format(self.seek_time), Log.DEBUG)
self.player.seekTime(self.seek_time)
tc = int(self.seek_time - self.player.getTime())
jsonRPC('Player.Seek', param={'playerid': 1, 'value': {'seconds': tc}})
sleep(0.5)
Log('Position: {}'.format(self.player.getTime() - 0.5), Log.DEBUG)
Log('Position: {}'.format(self.player.getTime()), Log.DEBUG)
self.hide()

def onAction(self, action):
Expand Down

0 comments on commit c2a35f8

Please sign in to comment.