Skip to content

Commit

Permalink
Merge pull request #853 from oddstr13/fix-849-1
Browse files Browse the repository at this point in the history
Gracefully handle missing VideoRangeType in stream tracks
  • Loading branch information
mcarlton00 authored Apr 9, 2024
2 parents 04551f7 + bc8cae9 commit b585377
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions jellyfin_kodi/helper/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,10 @@ def video_streams(self, tracks, container=None):

if "DvProfile" in track:
track['hdrtype'] = "dolbyvision"

elif track['VideoRangeType'] in ["HDR10", "HDR10Plus"]:
elif track.get('VideoRangeType', '') in ["HDR10", "HDR10Plus"]:
track['hdrtype'] = "hdr10"

elif "HLG" in track['VideoRangeType']:
elif "HLG" in track.get('VideoRangeType', ''):
track['hdrtype'] = "hlg"

elif track['VideoRangeType'] in ["SDR", "Unknown"]:
track['hdrtype'] = ""

track.update({
'hdrtype': track.get('hdrtype', "").lower(),
Expand Down

0 comments on commit b585377

Please sign in to comment.