fix(titles): name a dv profile 7 or 8 track with an unnamed pq base DV.HDR

This commit is contained in:
imSp4rky
2026-10-31 21:52:03 -06:00
parent 15e46d8bcc
commit d5a8ed2a39
2 changed files with 29 additions and 2 deletions
+8
View File
@@ -163,6 +163,14 @@ class Title:
if (primary_video_track.hdr_format or "").startswith("Dolby Vision"):
context["hdr"] = "DV"
base_layer = DYNAMIC_RANGE_MAP.get(hdr_format)
profile = getattr(primary_video_track, "hdr_format_profile", None) or ""
if (
base_layer in (None, "DV")
and trc
and "PQ" in trc
and profile.startswith(("dvhe.07", "dvhe.08"))
):
base_layer = "HDR"
if base_layer and base_layer != "DV":
context["hdr"] += f".{base_layer}"
elif (primary_video_track.hdr_format or "").startswith("HDR Vivid"):