mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 02:06:09 +00:00
Merge pull request #791 from pdf/report_playback_exception
Fix uncaught exception in Player.report_playback()
This commit is contained in:
commit
3a58d34018
1 changed files with 7 additions and 1 deletions
|
@ -326,7 +326,13 @@ class Player(xbmc.Player):
|
|||
if not report:
|
||||
|
||||
previous = item['CurrentPosition']
|
||||
|
||||
try:
|
||||
item['CurrentPosition'] = int(self.getTime())
|
||||
except Exception as e:
|
||||
# getTime() raises RuntimeError if nothing is playing
|
||||
LOG.debug("Failed to get playback position: %s", e)
|
||||
return
|
||||
|
||||
if int(item['CurrentPosition']) == 1:
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue