From 0935f85cb02ffaa3f5af13d8afc3346e9b7650ab Mon Sep 17 00:00:00 2001 From: santiagosayshey Date: Wed, 18 Dec 2024 23:28:52 +1050 Subject: [PATCH] feat(format): Overhauled Langauge System - Base language custom formats added, compiler will convert to other languages on the fly - Not : Matches releases that don't include the specified language - Not Only : Matches releases that include both the specified language, and others via parsed language logic - Not Only (Missing): Matches releases that include both the specified language, and others via regex pattern "Dual Audio" - New regex pattern to match dual audio - Set default language to "Must Include English" --- custom_formats/Not English.yml | 18 +++ custom_formats/Not Only English (Missing).yml | 18 +++ custom_formats/Not Only English.yml | 18 +++ profiles/1080p Encode.yml | 4 +- regex_patterns/Dual Audio.yml | 116 ++++++++++++++++++ 5 files changed, 172 insertions(+), 2 deletions(-) create mode 100644 custom_formats/Not English.yml create mode 100644 custom_formats/Not Only English (Missing).yml create mode 100644 custom_formats/Not Only English.yml create mode 100644 regex_patterns/Dual Audio.yml diff --git a/custom_formats/Not English.yml b/custom_formats/Not English.yml new file mode 100644 index 0000000..72204cb --- /dev/null +++ b/custom_formats/Not English.yml @@ -0,0 +1,18 @@ +name: Not English +description: Matches releases that don't include an English language track. Dual audio + is allowed. +tags: [] +conditions: +- exceptLanguage: true + language: english + name: Not English + negate: false + required: true + type: language +- exceptLanguage: false + language: english + name: Includes English + negate: true + required: false + type: language +tests: [] diff --git a/custom_formats/Not Only English (Missing).yml b/custom_formats/Not Only English (Missing).yml new file mode 100644 index 0000000..b74c33c --- /dev/null +++ b/custom_formats/Not Only English (Missing).yml @@ -0,0 +1,18 @@ +name: Not Only English (Missing) +description: "Attempts to matches releases with mutliple audio tracks but are not\ + \ parsed as \"Multi Langauge\". Instead, attempts to find regular expressions which\ + \ imply the release has dual audio. \n " +tags: [] +conditions: +- exceptLanguage: false + language: english + name: Includes English + negate: false + required: true + type: language +- name: Dual Audio Regex + type: release_title + required: true + negate: false + pattern: Dual Audio +tests: [] diff --git a/custom_formats/Not Only English.yml b/custom_formats/Not Only English.yml new file mode 100644 index 0000000..69c1078 --- /dev/null +++ b/custom_formats/Not Only English.yml @@ -0,0 +1,18 @@ +name: Not Only English +description: Matches releases that don't include an English language track. Dual audio + is NOT allowed. +tags: [] +conditions: +- exceptLanguage: true + language: english + name: Not English + negate: false + required: true + type: language +- exceptLanguage: false + language: english + name: Includes English + negate: false + required: true + type: language +tests: [] diff --git a/profiles/1080p Encode.yml b/profiles/1080p Encode.yml index a3dfe64..080201a 100644 --- a/profiles/1080p Encode.yml +++ b/profiles/1080p Encode.yml @@ -289,11 +289,11 @@ upgrade_until: name: Transparent capable description: All capable of being indistinguishable from source. WEB-DL included to not allow unknown encode to trump known WEB-DL. -language: original +language: must_english tweaks: preferFreeleech: true allowLosslessAudio: true allowDVNoFallback: false allowBleedingEdgeCodecs: false allowPrereleases: false - languageStrictness: disabled + languageStrictness: mustnot_english diff --git a/regex_patterns/Dual Audio.yml b/regex_patterns/Dual Audio.yml new file mode 100644 index 0000000..7fb9cda --- /dev/null +++ b/regex_patterns/Dual Audio.yml @@ -0,0 +1,116 @@ +name: Dual Audio +pattern: \b((multi[^a-zA-Z]*)|(dual[\s.-](audio|complete)))\b +description: Matches releases with Dual Audio; Media releases that contain two language + tracks - typically the original language (such as Japanese) along with an English + dub, allowing viewers to switch between either audio track while watching the same + video content. +tags: [] +tests: +- expected: true + id: 1 + input: "\t The.Hunger.Games.2012.MULTi.1080p.BluRay.DTS.HD.MA.x264-HeavyWeight" + lastRun: '2024-12-18T11:58:49.979470' + matchSpan: + end: 30 + start: 24 + matchedContent: MULTi. + matchedGroups: + - MULTi. + - MULTi. + - null + - null + passes: true +- expected: true + id: 2 + input: The.Hunger.Games.2012.1080p.AMZN.WEB-DL.Multi.DDP5.1.H.264-DHRUB_DXD + lastRun: '2024-12-18T11:58:49.979470' + matchSpan: + end: 46 + start: 40 + matchedContent: Multi. + matchedGroups: + - Multi. + - Multi. + - null + - null + passes: true +- expected: false + id: 3 + input: 'We Don''t Die, We Multiply: The Robin Harris Story' + lastRun: '2024-12-18T11:58:49.979470' + matchSpan: null + matchedContent: null + matchedGroups: [] + passes: true +- expected: true + id: 4 + input: Cyberpunk 2077 Phantom Liberty MULTi19 v2 2 DINOByTES + lastRun: '2024-12-18T11:58:49.979470' + matchSpan: + end: 39 + start: 31 + matchedContent: 'MULTi19 ' + matchedGroups: + - 'MULTi19 ' + - 'MULTi19 ' + - null + - null + passes: true +- expected: true + id: 5 + input: Attack on Titan S04 2020 1080p USA Blu-ray AVC TrueHD 5.1 Dual Audio -ZR- + lastRun: '2024-12-18T11:58:49.979470' + matchSpan: + end: 68 + start: 58 + matchedContent: Dual Audio + matchedGroups: + - Dual Audio + - null + - Dual Audio + - Audio + passes: true +- expected: true + id: 6 + input: DanMachi Sword Oratoria Vol 01-04 2017 ANiME DUAL COMPLETE BLURAY-iFPD + lastRun: '2024-12-18T11:58:49.979470' + matchSpan: + end: 58 + start: 45 + matchedContent: DUAL COMPLETE + matchedGroups: + - DUAL COMPLETE + - null + - DUAL COMPLETE + - COMPLETE + passes: true +- expected: true + id: 7 + input: Bleach.S12.1080p.BluRay.REMUX.AVC.Dual-Audio.DTS-HD.MA.2.0-ZR- + lastRun: '2024-12-18T11:58:49.979470' + matchSpan: + end: 44 + start: 34 + matchedContent: Dual-Audio + matchedGroups: + - Dual-Audio + - null + - Dual-Audio + - Audio + passes: true +- expected: false + id: 8 + input: Dual.2022.1080p.BluRay.DDP5.1.x264-iFT.mkv + lastRun: '2024-12-18T11:58:49.979470' + matchSpan: null + matchedContent: null + matchedGroups: [] + passes: true +- expected: false + id: 9 + input: uality.A.Graffiti.Story.2022.1080p.WEB.H264-AEROHOLiCS.mkv + lastRun: '2024-12-18T11:58:49.979470' + matchSpan: null + matchedContent: null + matchedGroups: [] + passes: true