From 10957dd0e8af73c46cc3c4ab43cd1591d0071ce7 Mon Sep 17 00:00:00 2001 From: santiagosayshey Date: Thu, 3 Apr 2025 04:55:35 +1050 Subject: [PATCH] fix(format): Simplify HDR regex and negate HDR10(+)? in CF --- custom_formats/HDR.yml | 10 +++++++ regex_patterns/HDR.yml | 62 ++++++++++-------------------------------- 2 files changed, 25 insertions(+), 47 deletions(-) diff --git a/custom_formats/HDR.yml b/custom_formats/HDR.yml index 7e98bef..28cad11 100644 --- a/custom_formats/HDR.yml +++ b/custom_formats/HDR.yml @@ -9,4 +9,14 @@ conditions: pattern: HDR required: true type: release_title +- name: Not HDR10 + type: release_title + required: true + negate: true + pattern: HDR10 +- name: Not HDR10+ + type: release_title + required: true + negate: true + pattern: HDR10+ tests: [] diff --git a/regex_patterns/HDR.yml b/regex_patterns/HDR.yml index c0613eb..b6999a6 100644 --- a/regex_patterns/HDR.yml +++ b/regex_patterns/HDR.yml @@ -1,9 +1,7 @@ name: HDR -pattern: (?<=^(?!.*\b(HLG|PQ|SDR)(\b|\d)).*?)\bHDR(?!10(\+|Plus)?)\b -description: 'This regex matches a `HDR` generalisation. i.e. only when it *is not* - followed by any HDR format specifiers like , `10+`, or `10Plus` and only when `HLG`, - `PQ` and `SDR` cannot be found. When matched, this pattern indicates an unknown - type of HDR - it can either by 10 or 10+. ' +pattern: \b(HDR)\b +description: 'This regex matches a `HDR` generalisation. This can be HDR10, HDR10+, + etc. ' tags: - Enhancement - Colour Grade @@ -12,20 +10,18 @@ tests: - expected: true id: 2 input: HDR+ - lastRun: '2025-04-02T20:12:32.851228' + lastRun: '2025-04-03T04:14:14.836165' matchSpan: end: 3 start: 0 matchedContent: HDR matchedGroups: - - null - - null - - null + - HDR passes: true - expected: false id: 3 input: HDR10 - lastRun: '2025-04-02T20:12:32.851228' + lastRun: '2025-04-03T04:14:14.836165' matchSpan: null matchedContent: null matchedGroups: [] @@ -33,31 +29,7 @@ tests: - expected: false id: 4 input: HDR10+ - lastRun: '2025-04-02T20:12:32.851228' - matchSpan: null - matchedContent: null - matchedGroups: [] - passes: true -- expected: false - id: 5 - input: HLG HDR - lastRun: '2025-04-02T20:12:32.851228' - matchSpan: null - matchedContent: null - matchedGroups: [] - passes: true -- expected: false - id: 6 - input: SDR HDR - lastRun: '2025-04-02T20:12:32.851228' - matchSpan: null - matchedContent: null - matchedGroups: [] - passes: true -- expected: false - id: 7 - input: PQ HDR - lastRun: '2025-04-02T20:12:32.851228' + lastRun: '2025-04-03T04:14:14.836165' matchSpan: null matchedContent: null matchedGroups: [] @@ -65,7 +37,7 @@ tests: - expected: false id: 8 input: HDR10 - lastRun: '2025-04-02T20:12:32.851228' + lastRun: '2025-04-03T04:14:14.836165' matchSpan: null matchedContent: null matchedGroups: [] @@ -74,35 +46,31 @@ tests: id: 9 input: Barbie (2023) 2160p UHD BluRay Hybrid REMUX HEVC DV HDR TrueHD Atmos 7.1 English-FraMeSToR - lastRun: '2025-04-02T20:12:32.851228' + lastRun: '2025-04-03T04:14:14.836165' matchSpan: end: 55 start: 52 matchedContent: HDR matchedGroups: - - null - - null - - null + - HDR passes: true - expected: true id: 10 input: Game of Thrones (2011) S06 2160p UHD BluRay REMUX HEVC DV HDR TrueHD Atmos 7.1 English-FraMeSToR - lastRun: '2025-04-02T20:12:32.851228' + lastRun: '2025-04-03T04:14:14.836165' matchSpan: end: 61 start: 58 matchedContent: HDR matchedGroups: - - null - - null - - null + - HDR passes: true - expected: false id: 11 input: Liu lang di qiu 2 AKA The Wandering Earth II 2023 2160p CHN UHD Blu-ray DoVi HDR10 HEVC TrueHD 7.1 Atmos-ANKO - lastRun: '2025-04-02T20:12:32.851228' + lastRun: '2025-04-03T04:14:14.836165' matchSpan: null matchedContent: null matchedGroups: [] @@ -111,7 +79,7 @@ tests: id: 12 input: Schindler's List (1993) 2160p UHD BluRay Hybrid REMUX HEVC DV HDR10+ TrueHD Atmos 7.1 English-WiLDCAT - lastRun: '2025-04-02T20:12:32.851228' + lastRun: '2025-04-03T04:14:14.836165' matchSpan: null matchedContent: null matchedGroups: [] @@ -120,7 +88,7 @@ tests: id: 13 input: Schindler's List (1993) 2160p UHD BluRay Hybrid REMUX HEVC DV HDR10P TrueHD Atmos 7.1 English-WiLDCAT - lastRun: '2025-04-02T20:12:32.851228' + lastRun: '2025-04-03T04:14:14.836165' matchSpan: null matchedContent: null matchedGroups: []