From 6ca6db355eb4437f41f60eca41357126560c68d0 Mon Sep 17 00:00:00 2001 From: santiagosayshey Date: Thu, 6 Feb 2025 08:05:08 +1030 Subject: [PATCH] feat: Repacks (#23) create(format): Repack CFs - Uses trash guides regexes as a baseline: https://trash-guides.info/Sonarr/sonarr-collection-of-custom-formats/#repackproper - Combines regexes into single patterns for performance - Explains different in p2p / scene naming standards tweak(profile): Add Repack CFs to quality profiles - Upgrade lone releases with repack / proper - Disregards freeleech by starting scores with +5 --- custom_formats/Repack1.yml | 30 +++++++++ custom_formats/Repack2.yml | 30 +++++++++ custom_formats/Repack3.yml | 30 +++++++++ profiles/1080p Balanced.yml | 6 ++ profiles/1080p Quality (HDR).yml | 6 ++ profiles/1080p Quality.yml | 6 ++ profiles/1080p Remux.yml | 6 ++ profiles/2160p Balanced.yml | 6 ++ profiles/2160p Quality.yml | 6 ++ profiles/2160p Remux.yml | 6 ++ regex_patterns/Repack1.yml | 69 +++++++++++++++++++ regex_patterns/Repack2.yml | 112 +++++++++++++++++++++++++++++++ regex_patterns/Repack3.yml | 112 +++++++++++++++++++++++++++++++ 13 files changed, 425 insertions(+) create mode 100644 custom_formats/Repack1.yml create mode 100644 custom_formats/Repack2.yml create mode 100644 custom_formats/Repack3.yml create mode 100644 regex_patterns/Repack1.yml create mode 100644 regex_patterns/Repack2.yml create mode 100644 regex_patterns/Repack3.yml diff --git a/custom_formats/Repack1.yml b/custom_formats/Repack1.yml new file mode 100644 index 0000000..e19c926 --- /dev/null +++ b/custom_formats/Repack1.yml @@ -0,0 +1,30 @@ +name: Repack1 +description: 'Release groups use specific terms to indicate when they''re fixing issues + in releases: + + In Scene releases, groups can only occupy one release slot, which leads to two different + terms: + + - PROPER is used when a different group fixes issues in another group''s release + + - REPACK is used when a group fixes issues in their own release + + + P2P releases are simpler - REPACK is typically used whenever a group releases a + fixed version. + + + REAL / RERIP indicate similar things but their specific meaning / origin is unclear. + + + This custom format will catch basic level fixes (no number suffixes).' +tags: +- Flag +- Repack +conditions: +- name: Repack1 + negate: false + pattern: Repack1 + required: true + type: release_title +tests: [] diff --git a/custom_formats/Repack2.yml b/custom_formats/Repack2.yml new file mode 100644 index 0000000..9abff2a --- /dev/null +++ b/custom_formats/Repack2.yml @@ -0,0 +1,30 @@ +name: Repack2 +description: 'Release groups use specific terms to indicate when they''re fixing issues + in releases: + + In Scene releases, groups can only occupy one release slot, which leads to two different + terms: + + - PROPER is used when a different group fixes issues in another group''s release + + - REPACK is used when a group fixes issues in their own release + + + P2P releases are simpler - REPACK is typically used whenever a group releases a + fixed version. + + + REAL / RERIP indicate similar things but their specific meaning / origin is unclear. + + + This custom format will catch level 2 fixes' +tags: +- Flag +- Repack +conditions: +- name: Repack2 + negate: false + pattern: Repack2 + required: true + type: release_title +tests: [] diff --git a/custom_formats/Repack3.yml b/custom_formats/Repack3.yml new file mode 100644 index 0000000..a0e3e71 --- /dev/null +++ b/custom_formats/Repack3.yml @@ -0,0 +1,30 @@ +name: Repack3 +description: 'Release groups use specific terms to indicate when they''re fixing issues + in releases: + + In Scene releases, groups can only occupy one release slot, which leads to two different + terms: + + - PROPER is used when a different group fixes issues in another group''s release + + - REPACK is used when a group fixes issues in their own release + + + P2P releases are simpler - REPACK is typically used whenever a group releases a + fixed version. + + + REAL / RERIP indicate similar things but their specific meaning / origin is unclear. + + + This custom format will catch level 3 fixes' +tags: +- Flag +- Repack +conditions: +- name: Repack3 + negate: false + pattern: Repack3 + required: true + type: release_title +tests: [] diff --git a/profiles/1080p Balanced.yml b/profiles/1080p Balanced.yml index df13bfb..e509c9d 100644 --- a/profiles/1080p Balanced.yml +++ b/profiles/1080p Balanced.yml @@ -86,6 +86,12 @@ custom_formats: score: 10 - name: x264 score: 10 +- name: Repack3 + score: 7 +- name: Repack2 + score: 6 +- name: Repack1 + score: 5 - name: 2160p score: -9999 - name: 3D diff --git a/profiles/1080p Quality (HDR).yml b/profiles/1080p Quality (HDR).yml index fae4c70..a5861fa 100644 --- a/profiles/1080p Quality (HDR).yml +++ b/profiles/1080p Quality (HDR).yml @@ -99,6 +99,12 @@ custom_formats: score: 10 - name: x264 score: 10 +- name: Repack3 + score: 7 +- name: Repack2 + score: 6 +- name: Repack1 + score: 5 - name: x265 score: -90 - name: 2160p diff --git a/profiles/1080p Quality.yml b/profiles/1080p Quality.yml index f9d0ff7..b78db4b 100644 --- a/profiles/1080p Quality.yml +++ b/profiles/1080p Quality.yml @@ -80,6 +80,12 @@ custom_formats: score: 10 - name: x264 score: 10 +- name: Repack3 + score: 7 +- name: Repack2 + score: 6 +- name: Repack1 + score: 5 - name: 2160p score: -9999 - name: 3D diff --git a/profiles/1080p Remux.yml b/profiles/1080p Remux.yml index 9147de6..cc6f22a 100644 --- a/profiles/1080p Remux.yml +++ b/profiles/1080p Remux.yml @@ -70,6 +70,12 @@ custom_formats: score: 10 - name: Roku score: 10 +- name: Repack3 + score: 7 +- name: Repack2 + score: 6 +- name: Repack1 + score: 5 - name: Unknown Lossless Audio score: 5 - name: 2160p diff --git a/profiles/2160p Balanced.yml b/profiles/2160p Balanced.yml index f3af1a6..64fd71c 100644 --- a/profiles/2160p Balanced.yml +++ b/profiles/2160p Balanced.yml @@ -114,6 +114,10 @@ custom_formats: score: 10 - name: x264 score: 10 +- name: Repack3 + score: 7 +- name: Repack2 + score: 6 - name: Atmos score: 5 - name: Atmos (Missing) @@ -122,6 +126,8 @@ custom_formats: score: 5 - name: FLAC score: 5 +- name: Repack1 + score: 5 - name: Unknown Lossless Audio score: 5 - name: SDR diff --git a/profiles/2160p Quality.yml b/profiles/2160p Quality.yml index 3aebfc9..bb32fc4 100644 --- a/profiles/2160p Quality.yml +++ b/profiles/2160p Quality.yml @@ -127,6 +127,10 @@ custom_formats: score: 10 - name: x264 score: 10 +- name: Repack3 + score: 7 +- name: Repack2 + score: 6 - name: Atmos score: 5 - name: Atmos (Missing) @@ -135,6 +139,8 @@ custom_formats: score: 5 - name: FLAC score: 5 +- name: Repack1 + score: 5 - name: Unknown Lossless Audio score: 5 - name: SDR diff --git a/profiles/2160p Remux.yml b/profiles/2160p Remux.yml index 9e84ee9..1834c2e 100644 --- a/profiles/2160p Remux.yml +++ b/profiles/2160p Remux.yml @@ -84,6 +84,12 @@ custom_formats: score: 10 - name: Roku score: 10 +- name: Repack3 + score: 7 +- name: Repack2 + score: 6 +- name: Repack1 + score: 5 - name: Unknown Lossless Audio score: 5 - name: 3D diff --git a/regex_patterns/Repack1.yml b/regex_patterns/Repack1.yml new file mode 100644 index 0000000..feaf481 --- /dev/null +++ b/regex_patterns/Repack1.yml @@ -0,0 +1,69 @@ +name: Repack1 +pattern: (?<=.*?\d{4}.*?)\b(re(pack|rip)|proper)\b +description: 'Matches ''PROPER'' or ''REPACK'' or ''RERIP'' only when they appear + after a year (4 digits) but not before one. + + + * `(?<=.*?\d{4}.*?)` - look for a 4-digit number before + + * `\b(re(pack|rip)|proper)\b` - match proper/repack/rerip' +tags: +- Repack +- Flag +tests: +- expected: true + id: 1 + input: The Zone of Interest 2023 PROPER 2160p UHD BluRay TrueHD 7.1 Atmos HDR x265-MainFrame + lastRun: '2025-02-06T06:58:16.693168' + matchSpan: + end: 32 + start: 26 + matchedContent: PROPER + matchedGroups: + - PROPER + - null + passes: true +- expected: false + id: 2 + input: Proper.Pronouns.2020.720p.WEB-DL.AAC2.0.x264-ZTR.mkv + lastRun: '2025-02-06T06:58:16.693168' + matchSpan: null + matchedContent: null + matchedGroups: [] + passes: true +- expected: true + id: 3 + input: Proper.Pronouns.2020.720p.PROPER.WEB-DL.AAC2.0.x264-ZTR.mkv + lastRun: '2025-02-06T06:58:16.693168' + matchSpan: + end: 32 + start: 26 + matchedContent: PROPER + matchedGroups: + - PROPER + - null + passes: true +- expected: true + id: 4 + input: Sonic.the.Hedgehog.3.2024.REPACK.2160p.WEB-DL.DDP5.1.Atmos.DoVi.HDR.H.265-FLUX + lastRun: '2025-02-06T06:58:16.693168' + matchSpan: + end: 32 + start: 26 + matchedContent: REPACK + matchedGroups: + - REPACK + - PACK + passes: true +- expected: true + id: 5 + input: roommate.wanted.2015.rerip.720p.bluray.x264-rusted.mkv + lastRun: '2025-02-06T06:58:16.693168' + matchSpan: + end: 26 + start: 21 + matchedContent: rerip + matchedGroups: + - rerip + - rip + passes: true diff --git a/regex_patterns/Repack2.yml b/regex_patterns/Repack2.yml new file mode 100644 index 0000000..e71deb8 --- /dev/null +++ b/regex_patterns/Repack2.yml @@ -0,0 +1,112 @@ +name: Repack2 +pattern: \b(real[\s.]?(re(pack|rip)|proper)|(re(pack|rip)|proper)2)\b +description: 'Matches either "real" (with optional space/dot) followed by proper/repack/rerip, + or proper2/repack2/rerip2 + + + * `\b(real[\s.]?(re(pack|rip)|proper)` - match real followed by proper/repack/rerip + + * `|(re(pack|rip)|proper)2)\b` - or match proper2/repack2/rerip2' +tags: +- Repack +- Flag +tests: +- expected: true + id: 1 + input: The Zone of Interest 2023 PROPER2 2160p UHD BluRay TrueHD 7.1 Atmos HDR x265-MainFrame + lastRun: '2025-02-06T07:10:05.298113' + matchSpan: + end: 33 + start: 26 + matchedContent: PROPER2 + matchedGroups: + - PROPER2 + - null + - null + - PROPER + - null + passes: true +- expected: false + id: 2 + input: Proper.Pronouns.2020.720p.WEB-DL.AAC2.0.x264-ZTR.mkv + lastRun: '2025-02-06T07:10:05.298113' + matchSpan: null + matchedContent: null + matchedGroups: [] + passes: true +- expected: true + id: 3 + input: Proper.Pronouns.2020.720p.PROPER2.WEB-DL.AAC2.0.x264-ZTR.mkv + lastRun: '2025-02-06T07:10:05.298113' + matchSpan: + end: 33 + start: 26 + matchedContent: PROPER2 + matchedGroups: + - PROPER2 + - null + - null + - PROPER + - null + passes: true +- expected: true + id: 4 + input: Sonic.the.Hedgehog.3.2024.REPACK2.2160p.WEB-DL.DDP5.1.Atmos.DoVi.HDR.H.265-FLUX + lastRun: '2025-02-06T07:10:05.298113' + matchSpan: + end: 33 + start: 26 + matchedContent: REPACK2 + matchedGroups: + - REPACK2 + - null + - null + - REPACK + - PACK + passes: true +- expected: true + id: 5 + input: roommate.wanted.2015.rerip2.720p.bluray.x264-rusted.mkv + lastRun: '2025-02-06T07:10:05.298113' + matchSpan: + end: 27 + start: 21 + matchedContent: rerip2 + matchedGroups: + - rerip2 + - null + - null + - rerip + - rip + passes: true +- expected: false + id: 6 + input: The Zone of Interest 2023 PROPER 2160p UHD BluRay TrueHD 7.1 Atmos HDR x265-MainFrame + lastRun: '2025-02-06T07:10:05.298113' + matchSpan: null + matchedContent: null + matchedGroups: [] + passes: true +- expected: false + id: 7 + input: Sonic.the.Hedgehog.3.2024.REPACK.2160p.WEB-DL.DDP5.1.Atmos.DoVi.HDR.H.265-FLUX + lastRun: '2025-02-06T07:10:05.298113' + matchSpan: null + matchedContent: null + matchedGroups: [] + passes: true +- expected: true + id: 8 + input: Yo-Kai Watch S02E17 DUBBED REAL REPACK HDTV x264-W4F + lastRun: '2025-02-06T07:10:05.298113' + matchSpan: + end: 38 + start: 27 + matchedContent: REAL REPACK + matchedGroups: + - REAL REPACK + - REPACK + - PACK + - null + - null + passes: true diff --git a/regex_patterns/Repack3.yml b/regex_patterns/Repack3.yml new file mode 100644 index 0000000..b70309b --- /dev/null +++ b/regex_patterns/Repack3.yml @@ -0,0 +1,112 @@ +name: Repack3 +pattern: \b(real[\s.]?real[\s.]?(re(pack|rip)|proper)|(re(pack|rip)|proper)3)\b +description: 'Matches either "real real" (with optional space/dot between words) followed + by proper/repack/rerip, or proper3/repack3/rerip3 + + + * `\b(real[\s.]?real[\s.]?(re(pack|rip)|proper)` - match real real followed by proper/repack/rerip + + * `|(re(pack|rip)|proper)3)\b` - or match proper3/repack3/rerip3' +tags: +- Repack +- Flag +tests: +- expected: true + id: 1 + input: The Zone of Interest 2023 PROPER3 2160p UHD BluRay TrueHD 7.1 Atmos HDR x265-MainFrame + lastRun: '2025-02-06T07:11:35.323972' + matchSpan: + end: 33 + start: 26 + matchedContent: PROPER3 + matchedGroups: + - PROPER3 + - null + - null + - PROPER + - null + passes: true +- expected: false + id: 2 + input: Proper.Pronouns.2020.720p.WEB-DL.AAC2.0.x264-ZTR.mkv + lastRun: '2025-02-06T07:11:35.323972' + matchSpan: null + matchedContent: null + matchedGroups: [] + passes: true +- expected: true + id: 3 + input: Proper.Pronouns.2020.720p.PROPER3.WEB-DL.AAC2.0.x264-ZTR.mkv + lastRun: '2025-02-06T07:11:35.323972' + matchSpan: + end: 33 + start: 26 + matchedContent: PROPER3 + matchedGroups: + - PROPER3 + - null + - null + - PROPER + - null + passes: true +- expected: true + id: 4 + input: Sonic.the.Hedgehog.3.2024.REPACK3.2160p.WEB-DL.DDP5.1.Atmos.DoVi.HDR.H.265-FLUX + lastRun: '2025-02-06T07:11:35.323972' + matchSpan: + end: 33 + start: 26 + matchedContent: REPACK3 + matchedGroups: + - REPACK3 + - null + - null + - REPACK + - PACK + passes: true +- expected: true + id: 5 + input: roommate.wanted.2015.rerip3.720p.bluray.x264-rusted.mkv + lastRun: '2025-02-06T07:11:35.323972' + matchSpan: + end: 27 + start: 21 + matchedContent: rerip3 + matchedGroups: + - rerip3 + - null + - null + - rerip + - rip + passes: true +- expected: false + id: 6 + input: The Zone of Interest 2023 PROPER 2160p UHD BluRay TrueHD 7.1 Atmos HDR x265-MainFrame + lastRun: '2025-02-06T07:11:35.323972' + matchSpan: null + matchedContent: null + matchedGroups: [] + passes: true +- expected: false + id: 7 + input: Sonic.the.Hedgehog.3.2024.REPACK.2160p.WEB-DL.DDP5.1.Atmos.DoVi.HDR.H.265-FLUX + lastRun: '2025-02-06T07:11:35.323972' + matchSpan: null + matchedContent: null + matchedGroups: [] + passes: true +- expected: true + id: 8 + input: Yo-Kai Watch S02E17 DUBBED REAL REAL REPACK HDTV x264-W4F + lastRun: '2025-02-06T07:11:35.323972' + matchSpan: + end: 43 + start: 27 + matchedContent: REAL REAL REPACK + matchedGroups: + - REAL REAL REPACK + - REPACK + - PACK + - null + - null + passes: true