Skip to content

Commit

Permalink
Log when catching generic exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
oddstr13 authored Feb 7, 2024
1 parent 064a02a commit 248b49c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion jellyfin_kodi/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,9 @@ def report_playback(self, report=True):

try:
item['CurrentPosition'] = int(self.getTime())
except Exception: # at this point we should be playing and if not then bail out
except Exception as e:

Check warning on line 332 in jellyfin_kodi/player.py

View check run for this annotation

Codecov / codecov/patch

jellyfin_kodi/player.py#L330-L332

Added lines #L330 - L332 were not covered by tests
# getTime() raises RuntimeError if nothing is playing
LOG.debug("Failed to get playback position: %s", e)
return

Check warning on line 335 in jellyfin_kodi/player.py

View check run for this annotation

Codecov / codecov/patch

jellyfin_kodi/player.py#L334-L335

Added lines #L334 - L335 were not covered by tests

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

0 comments on commit 248b49c

Please sign in to comment.