tweak(regex): Update x264 pattern to improve matching with delimeters and add new test cases

This commit is contained in:
gehrleib 2025-02-16 16:06:42 -05:00
parent 372fa3339a
commit 37bb2e28c5
1 changed files with 50 additions and 45 deletions

View File

@ -1,75 +1,80 @@
name: x264 name: x264
pattern: ^(?!.*remux)(?=.*(?:\bDVDRip(?!.*\b(?:XviD|x265|AV1)\b)|\b[xh]\.?264\b)).* pattern: ^(?!.*remux)(?=.*(?:\bDVDRip(?!.*\b(?:XviD|[xh][\-\.\s]?265|HEVC|AV1)\b)|\b[xh][\-\.\s]?264\b)).*
description: "An open source encoder that produces H.264 videos. \n\n- Ensures `remux`\ description: "An open source encoder that produces H.264 videos. \n\n- Ensures `remux`\
\ is not present anywhere\n- Matches both `x264` and `h264` (assuming misclassification\ \ is not present anywhere\n- Matches both `x264` and `h264` (assuming misclassification\
\ if `remux` is absent)\n- Matches `DVDRip`, **only if it is NOT followed by** `XviD`,\ \ if `remux` is absent)\n- Matches `DVDRip`, **only if it is NOT followed by** `XviD`,\
\ `x265`, or `AV1`\n- False positives may occur with multiple sources (e.g., `DVDRip`\ \ `x265`, or `AV1`\n- Matches in cases of multiple sources (e.g., `DVDRip` and `BDRip`\
\ and `BDRip` with varying encodes)." \ with varying encodes)."
tags: tags:
- Encoder - Encoder
- Codec - Codec
tests: tests:
- expected: true - expected: true
id: 1
input: Dan Da Dan AKA Dandadan S01E10 1080p CR WEB-DL AAC 2.0 x264-SubsPlease
lastRun: '2025-02-15T15:18:11.869122'
matchSpan:
end: 70
start: 0
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: '2025-02-15T15:18:11.869122'
matchSpan:
end: 40
start: 0
matchedContent: Life of Pi 2012 1080p BluRay x264-SPARKS
matchedGroups: []
passes: true
- expected: false
id: 3
input: Scrubs (2001) S04 REPACK (1080p AIUS DVDRip x265 10bit AC3 5 1 English -
JBENT)[TAoE]
lastRun: '2025-02-15T15:18:11.869122'
matchSpan: null
matchedContent: null
matchedGroups: []
passes: true
- expected: false
id: 4 id: 4
input: Wallander UK S01-S04 DVDRip XviD BDRip x264-Scene (2008-2016) input: Wallander UK S01-S04 DVDRip XviD BDRip x264-Scene (2008-2016)
lastRun: '2025-02-15T15:18:11.869122' lastRun: '2025-02-16T16:04:21.638922'
matchSpan: matchSpan:
end: 61 end: 61
start: 0 start: 0
matchedContent: Wallander UK S01-S04 DVDRip XviD BDRip x264-Scene (2008-2016) matchedContent: Wallander UK S01-S04 DVDRip XviD BDRip x264-Scene (2008-2016)
matchedGroups: [] matchedGroups: []
passes: false passes: true
- expected: false - expected: true
id: 5 id: 5
input: Rugrats S05 480p DVDRip Opus 2.0 AV1-Jenkins input: Movie.2024.WEB-DL.1080p.x264.AAC.mkv
lastRun: '2025-02-15T15:18:11.869122' lastRun: '2025-02-16T16:04:21.638922'
matchSpan: null matchSpan:
matchedContent: null end: 36
start: 0
matchedContent: Movie.2024.WEB-DL.1080p.x264.AAC.mkv
matchedGroups: [] matchedGroups: []
passes: true passes: true
- expected: true - expected: true
id: 6 id: 6
input: _Summer S00 JAPANESE 480p DVDRip DD 2.0 x264-Tsundere input: Movie.2024.BDRip.720p.H.264.mkv
lastRun: '2025-02-15T15:18:11.869122' lastRun: '2025-02-16T16:04:21.638922'
matchSpan: matchSpan:
end: 53 end: 31
start: 0 start: 0
matchedContent: Summer S00 JAPANESE 480p DVDRip DD 2.0 x264-Tsundere matchedContent: Movie.2024.BDRip.720p.H.264.mkv
matchedGroups: [] matchedGroups: []
passes: true passes: true
- expected: false - expected: false
id: 7 id: 7
input: Some.Movie.2023.REMUX.1080p.BluRay.x264 input: Movie.2024.DVDRip.XviD.AC3.avi
lastRun: '2025-02-15T15:18:11.869122' lastRun: '2025-02-16T16:04:21.638922'
matchSpan: null
matchedContent: null
matchedGroups: []
passes: true
- expected: false
id: 8
input: Movie.2024.DVDRip.x265.HEVC.mkv
lastRun: '2025-02-16T16:04:21.638922'
matchSpan: null
matchedContent: null
matchedGroups: []
passes: true
- expected: false
id: 9
input: Movie.2024.DVDRip.AV1.OPUS.mkv
lastRun: '2025-02-16T16:04:21.638922'
matchSpan: null
matchedContent: null
matchedGroups: []
passes: true
- expected: false
id: 10
input: Movie.2024.BDRip.1080p.x264-REMUX.mkv
lastRun: '2025-02-16T16:04:21.638922'
matchSpan: null
matchedContent: null
matchedGroups: []
passes: true
- expected: false
id: 11
input: Movie.2024.720p.WEB-DL.H.265.mkv
lastRun: '2025-02-16T16:04:21.638922'
matchSpan: null matchSpan: null
matchedContent: null matchedContent: null
matchedGroups: [] matchedGroups: []