Skip to content

Commit

Permalink
Merge pull request #791 from pdf/report_playback_exception
Browse files Browse the repository at this point in the history
Fix uncaught exception in Player.report_playback()
  • Loading branch information
oddstr13 authored Feb 7, 2024
2 parents 20fd126 + 248b49c commit 3a58d34
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion jellyfin_kodi/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,13 @@ def report_playback(self, report=True):
if not report:

previous = item['CurrentPosition']
item['CurrentPosition'] = int(self.getTime())

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
Expand Down

0 comments on commit 3a58d34

Please sign in to comment.