Skip to content

Commit

Permalink
Fix uncaught exception in Player.report_playback()
Browse files Browse the repository at this point in the history
  • Loading branch information
pdf committed Nov 21, 2023
1 parent e95e8d6 commit 064a02a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion jellyfin_kodi/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,11 @@ 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: # at this point we should be playing and if not then bail out
return

Check warning on line 333 in jellyfin_kodi/player.py

View check run for this annotation

Codecov / codecov/patch

jellyfin_kodi/player.py#L330-L333

Added lines #L330 - L333 were not covered by tests

if int(item['CurrentPosition']) == 1:
return
Expand Down

0 comments on commit 064a02a

Please sign in to comment.