fix(naming): tag HDR10+ from the track range when MediaInfo misses it

This commit is contained in:
imSp4rky
2026-10-30 17:28:50 -06:00
parent b0f96cdee9
commit b493c9cd52
2 changed files with 56 additions and 1 deletions
+3 -1
View File
@@ -13,7 +13,7 @@ from unshackle.core.constants import (
SPACED_AUDIO_CODECS,
VIDEO_CODEC_MAP,
)
from unshackle.core.tracks import Tracks
from unshackle.core.tracks import Tracks, Video
from unshackle.core.utilities import spoken_language
@@ -167,6 +167,8 @@ class Title:
context["hdr"] = "HDR"
else:
context["hdr"] = DYNAMIC_RANGE_MAP.get(hdr_format, "")
if context["hdr"] == "HDR" and any(v.range == Video.Range.HDR10P for v in self.tracks.videos[:1]):
context["hdr"] = DYNAMIC_RANGE_MAP["HDR10+"]
elif trc and "HLG" in trc:
context["hdr"] = "HLG"
else: