From 776d40ccebb189513877cbc9ff7e2379aa3f3864 Mon Sep 17 00:00:00 2001 From: Brandon Date: Sun, 9 Feb 2025 00:27:13 -0500 Subject: [PATCH 1/3] Remove Xvid from x264 regex and adjust it to meet all remaining tests. Instead, the custom format should negate Xvid. --- custom_formats/x264.yml | 13 ++++-- regex_patterns/x264.yml | 96 +++++++++++++++++++---------------------- 2 files changed, 53 insertions(+), 56 deletions(-) diff --git a/custom_formats/x264.yml b/custom_formats/x264.yml index 5602422..a6e44df 100644 --- a/custom_formats/x264.yml +++ b/custom_formats/x264.yml @@ -4,13 +4,18 @@ tags: - Codec conditions: - name: x264 + type: release_title + required: true negate: false pattern: x264 - required: true - type: release_title - name: Not WEB-DL - type: source - required: false negate: true + required: true source: web_dl + type: source +- name: Not Xvid + type: release_title + required: true + negate: true + pattern: Xvid tests: [] diff --git a/regex_patterns/x264.yml b/regex_patterns/x264.yml index edf0eea..70c8a19 100644 --- a/regex_patterns/x264.yml +++ b/regex_patterns/x264.yml @@ -1,5 +1,5 @@ name: x264 -pattern: ^(?!.*(?i:remux)).*([xh](\.?264)|DVDRip) +pattern: ^(?:(?=.*\bremux\b.*\b(?:h\.?264)\b)|(?=.*\bx264\b)(?!.*\bremux\b)).*$ description: 'An open source encoder that produces H.264 videos. ' tags: - Encoder @@ -8,73 +8,65 @@ tests: - expected: true id: 1 input: Dan Da Dan AKA Dandadan S01E10 1080p CR WEB-DL AAC 2.0 x264-SubsPlease - lastRun: '2024-12-07T00:22:39.865345' + lastRun: '2025-02-08T23:38:43.613169' matchSpan: - end: 59 + end: 70 start: 0 - matchedContent: Dan Da Dan AKA Dandadan S01E10 1080p CR WEB-DL AAC 2.0 x264 - matchedGroups: - - x264 - - '264' + matchedContent: Dan Da Dan AKA Dandadan S01E10 1080p CR WEB-DL AAC 2.0 x264-SubsPlease + matchedGroups: [] passes: true - expected: true id: 2 input: Life of Pi 2012 1080p BluRay x264-SPARKS - lastRun: '2024-12-07T00:22:39.865345' + lastRun: '2025-02-08T23:38:43.613169' matchSpan: - end: 33 + end: 40 start: 0 - matchedContent: Life of Pi 2012 1080p BluRay x264 - matchedGroups: - - x264 - - '264' + matchedContent: Life of Pi 2012 1080p BluRay x264-SPARKS + matchedGroups: [] passes: true -- expected: false +- expected: true id: 3 - input: Scrubs (2001) S04 REPACK (1080p AIUS DVDRip x265 10bit AC3 5 1 English - - JBENT)[TAoE] - lastRun: '2024-12-07T00:22:39.865345' + input: Movie.Title.2023.1080p.BluRay.REMUX.h.264.DTS-HD.MA.5.1-GRP + lastRun: '2025-02-08T23:38:43.613169' matchSpan: - end: 43 + end: 59 start: 0 - matchedContent: Scrubs (2001) S04 REPACK (1080p AIUS DVDRip - matchedGroups: - - DVDRip - - null - passes: false -- expected: false + matchedContent: Movie.Title.2023.1080p.BluRay.REMUX.h.264.DTS-HD.MA.5.1-GRP + matchedGroups: [] + passes: true +- expected: true id: 4 input: Wallander UK S01-S04 DVDRip XviD BDRip x264-Scene (2008-2016) - lastRun: '2024-12-07T00:22:39.865345' + lastRun: '2025-02-08T23:38:43.613169' matchSpan: - end: 43 + end: 61 start: 0 - matchedContent: Wallander UK S01-S04 DVDRip XviD BDRip x264 - matchedGroups: - - x264 - - '264' - passes: false + matchedContent: Wallander UK S01-S04 DVDRip XviD BDRip x264-Scene (2008-2016) + matchedGroups: [] + passes: true - expected: false id: 5 - input: Rugrats S05 480p DVDRip Opus 2.0 AV1-Jenkins - lastRun: '2024-12-07T00:22:39.865345' - matchSpan: - end: 23 - start: 0 - matchedContent: Rugrats S05 480p DVDRip - matchedGroups: - - DVDRip - - null - passes: false -- expected: true - id: 6 - input: _Summer S00 JAPANESE 480p DVDRip DD 2.0 x264-Tsundere - lastRun: '2024-12-07T00:22:39.865345' - matchSpan: - end: 44 - start: 0 - matchedContent: _Summer S00 JAPANESE 480p DVDRip DD 2.0 x264 - matchedGroups: - - x264 - - '264' + input: Scrubs (2001) S04 REPACK (1080p AIUS DVDRip x265 10bit AC3 5 1 English - + JBENT)[TAoE] + lastRun: '2025-02-08T23:38:43.613169' + matchSpan: null + matchedContent: null + matchedGroups: [] + passes: true +- expected: false + id: 6 + input: Rugrats S05 480p DVDRip Opus 2.0 AV1-Jenkins + lastRun: '2025-02-08T23:38:43.613169' + matchSpan: null + matchedContent: null + matchedGroups: [] + passes: true +- expected: false + id: 7 + input: Movie.Title.2023.1080p.BluRay.REMUX.h265.DTS-HD.MA.5.1-GRP + lastRun: '2025-02-08T23:38:43.613169' + matchSpan: null + matchedContent: null + matchedGroups: [] passes: true From fa23c263f0513edfab1c416966540cc7efacd86e Mon Sep 17 00:00:00 2001 From: Brandon Date: Sun, 9 Feb 2025 13:38:08 -0500 Subject: [PATCH 2/3] The \. is still important to escape the period, so it matches a literal period and not any character. --- regex_patterns/7.1 Surround.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regex_patterns/7.1 Surround.yml b/regex_patterns/7.1 Surround.yml index aa6794e..ba94ff6 100644 --- a/regex_patterns/7.1 Surround.yml +++ b/regex_patterns/7.1 Surround.yml @@ -1,5 +1,5 @@ name: 7.1 Surround -pattern: '7.1' +pattern: '7\.1' description: '' tags: - Audio From faf57f58cb74a0884f61d716434ece9f9df67137 Mon Sep 17 00:00:00 2001 From: Brandon Date: Sun, 9 Feb 2025 17:03:50 -0500 Subject: [PATCH 3/3] Match lines of text that contain the word "x264" but do not contain the word "remux" --- regex_patterns/x264.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/regex_patterns/x264.yml b/regex_patterns/x264.yml index 70c8a19..f6ced27 100644 --- a/regex_patterns/x264.yml +++ b/regex_patterns/x264.yml @@ -1,5 +1,5 @@ name: x264 -pattern: ^(?:(?=.*\bremux\b.*\b(?:h\.?264)\b)|(?=.*\bx264\b)(?!.*\bremux\b)).*$ +pattern: ^(?:(?=.*\bx264\b)(?!.*\bremux\b)).*$ description: 'An open source encoder that produces H.264 videos. ' tags: - Encoder @@ -25,14 +25,12 @@ tests: matchedContent: Life of Pi 2012 1080p BluRay x264-SPARKS matchedGroups: [] passes: true -- expected: true +- expected: false id: 3 input: Movie.Title.2023.1080p.BluRay.REMUX.h.264.DTS-HD.MA.5.1-GRP lastRun: '2025-02-08T23:38:43.613169' - matchSpan: - end: 59 - start: 0 - matchedContent: Movie.Title.2023.1080p.BluRay.REMUX.h.264.DTS-HD.MA.5.1-GRP + matchSpan: null + matchedContent: null matchedGroups: [] passes: true - expected: true