mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-05-16 06:15:07 +00:00
Fix resume/start from beginning
Also fix seek verification (kodi seek does not seem to trigger expected built-in functions)
This commit is contained in:
parent
2c0f6a16a0
commit
df306e69d7
2 changed files with 24 additions and 14 deletions
|
@ -239,6 +239,9 @@ class Player(xbmc.Player):
|
|||
LOG.debug("--<[ paused ]")
|
||||
|
||||
def onPlayBackSeek(self, time, seekOffset):
|
||||
|
||||
''' Does not seem to work??
|
||||
'''
|
||||
current_file = self.getPlayingFile()
|
||||
|
||||
if current_file in self.played:
|
||||
|
@ -249,6 +252,7 @@ class Player(xbmc.Player):
|
|||
def report_playback(self, report=True):
|
||||
|
||||
''' Report playback progress to emby server.
|
||||
Check if the user seek.
|
||||
'''
|
||||
current_file = self.getPlayingFile()
|
||||
|
||||
|
@ -258,9 +262,13 @@ class Player(xbmc.Player):
|
|||
item = self.played[current_file]
|
||||
|
||||
if not report:
|
||||
|
||||
previous = item['CurrentPosition']
|
||||
item['CurrentPosition'] = int(self.getTime())
|
||||
|
||||
return
|
||||
if (item['CurrentPosition'] - previous) < 30:
|
||||
|
||||
return
|
||||
|
||||
result = JSONRPC('Application.GetProperties').execute({'properties': ["volume", "muted"]})
|
||||
result = result.get('result', {})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue