mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-13 21:56:11 +00:00
Gracefully handle missing VideoRangeType in stream tracks
This commit is contained in:
parent
04551f7925
commit
bc8cae9850
1 changed files with 2 additions and 7 deletions
|
@ -75,16 +75,11 @@ class API(object):
|
||||||
|
|
||||||
if "DvProfile" in track:
|
if "DvProfile" in track:
|
||||||
track['hdrtype'] = "dolbyvision"
|
track['hdrtype'] = "dolbyvision"
|
||||||
|
elif track.get('VideoRangeType', '') in ["HDR10", "HDR10Plus"]:
|
||||||
elif track['VideoRangeType'] in ["HDR10", "HDR10Plus"]:
|
|
||||||
track['hdrtype'] = "hdr10"
|
track['hdrtype'] = "hdr10"
|
||||||
|
elif "HLG" in track.get('VideoRangeType', ''):
|
||||||
elif "HLG" in track['VideoRangeType']:
|
|
||||||
track['hdrtype'] = "hlg"
|
track['hdrtype'] = "hlg"
|
||||||
|
|
||||||
elif track['VideoRangeType'] in ["SDR", "Unknown"]:
|
|
||||||
track['hdrtype'] = ""
|
|
||||||
|
|
||||||
track.update({
|
track.update({
|
||||||
'hdrtype': track.get('hdrtype', "").lower(),
|
'hdrtype': track.get('hdrtype', "").lower(),
|
||||||
'codec': track.get('Codec', "").lower(),
|
'codec': track.get('Codec', "").lower(),
|
||||||
|
|
Loading…
Reference in a new issue