From b7c4f2eefe40c3f6b147e07cc3d83de120094fdc Mon Sep 17 00:00:00 2001 From: chrisdecker08 <62341865+chrisdecker08@users.noreply.github.com> Date: Sat, 14 Dec 2024 15:24:08 -0500 Subject: [PATCH] detect HDR transcodes via colorTrc attribute (#2466) --- plexpy/pmsconnect.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plexpy/pmsconnect.py b/plexpy/pmsconnect.py index 2575d2da..46cd143e 100644 --- a/plexpy/pmsconnect.py +++ b/plexpy/pmsconnect.py @@ -3386,10 +3386,10 @@ class PmsConnect(object): def get_dynamic_range(stream): extended_display_title = helpers.get_xml_attr(stream, 'extendedDisplayTitle') bit_depth = helpers.cast_to_int(helpers.get_xml_attr(stream, 'bitDepth')) - color_space = helpers.get_xml_attr(stream, 'colorSpace') + color_trc = helpers.get_xml_attr(stream, 'colorTrc') DOVI_profile = helpers.get_xml_attr(stream, 'DOVIProfile') - HDR = bool(bit_depth > 8 and 'bt2020' in color_space) + HDR = bool(bit_depth > 8 and (color_trc == 'smpte2084' or color_trc == 'arib-std-b67')) DV = bool(DOVI_profile) if not HDR and not DV: