From fcd70e5b0f885e20bef497e8bacdb7a96a16fe64 Mon Sep 17 00:00:00 2001 From: Andy Date: Wed, 14 Jan 2026 22:25:58 +0000 Subject: [PATCH] fix(titles): detect HDR10 in hybrid DV filenames correctly Hybrid DV+HDR10 files were named "DV.H.265" instead of "DV.HDR.H.265" because the HDR10 detection only checked hdr_format_full which contains "Dolby Vision / SMPTE ST 2094". The "HDR10" indicator is in hdr_format_commercial, not hdr_format_full. Now checks both fields for HDR10 compatibility indicators. --- unshackle/core/titles/episode.py | 5 ++++- unshackle/core/titles/movie.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/unshackle/core/titles/episode.py b/unshackle/core/titles/episode.py index 6592b60..b260ce9 100644 --- a/unshackle/core/titles/episode.py +++ b/unshackle/core/titles/episode.py @@ -185,7 +185,10 @@ class Episode(Title): if hdr_format: if hdr_format_full.startswith("Dolby Vision"): name += " DV" - if any(indicator in hdr_format_full for indicator in ["HDR10", "SMPTE ST 2086"]): + if any( + indicator in (hdr_format_full + " " + hdr_format) + for indicator in ["HDR10", "SMPTE ST 2086"] + ): name += " HDR" else: name += f" {DYNAMIC_RANGE_MAP.get(hdr_format)} " diff --git a/unshackle/core/titles/movie.py b/unshackle/core/titles/movie.py index 1545b18..bda68df 100644 --- a/unshackle/core/titles/movie.py +++ b/unshackle/core/titles/movie.py @@ -136,7 +136,10 @@ class Movie(Title): if hdr_format: if hdr_format_full.startswith("Dolby Vision"): name += " DV" - if any(indicator in hdr_format_full for indicator in ["HDR10", "SMPTE ST 2086"]): + if any( + indicator in (hdr_format_full + " " + hdr_format) + for indicator in ["HDR10", "SMPTE ST 2086"] + ): name += " HDR" else: name += f" {DYNAMIC_RANGE_MAP.get(hdr_format)} "