From dfc50f9852a58f18900bd507717a109ba07f948f Mon Sep 17 00:00:00 2001 From: Bogdan Date: Sun, 5 Feb 2023 04:57:49 +0200 Subject: [PATCH] cartoonchaos: fix title naming (#13973) same for CRT --- src/Jackett.Common/Definitions/cartoonchaos.yml | 16 ++++++++++++---- .../Definitions/cathoderaytube.yml | 10 +++++----- src/Jackett.Common/Definitions/crt2fa.yml | 10 +++++----- 3 files changed, 22 insertions(+), 14 deletions(-) diff --git a/src/Jackett.Common/Definitions/cartoonchaos.yml b/src/Jackett.Common/Definitions/cartoonchaos.yml index bf0b423a4..45c34dcb5 100644 --- a/src/Jackett.Common/Definitions/cartoonchaos.yml +++ b/src/Jackett.Common/Definitions/cartoonchaos.yml @@ -114,10 +114,6 @@ search: args: ["(?i)\\.torrent$", ""] title_text: selector: td a[href^="index.php?page=torrent-details"] - filters: - # #11775 - - name: re_replace - args: ["(?i)(season )", "S"] category: selector: td a[href^="index.php?page=torrents&category="] attribute: href @@ -126,6 +122,18 @@ search: args: category title: text: "{{ if .Result.title_torrent }}{{ .Result.title_torrent }}{{ else }}{{ .Result.title_text }}{{ end }}" + filters: + # #11775 + - name: re_replace # Seasons X-Y --> S0X-S0Y + args: ["(?i)\\bSeasons?[-.\\s]*(\\d)[-.\\s]*(?:-|to)[-.\\s]*(\\d)\\b", "S0$1-S0$2"] + - name: re_replace # Seasons X-YY --> S0X-SYY + args: ["(?i)\\bSeasons?[-.\\s]*(\\d)[-.\\s]*(?:-|to)[-.\\s]*(\\d+)\\b", "S0$1-S$2"] + - name: re_replace # Seasons XX-YY --> SXX-SYY + args: ["(?i)\\bSeasons?[-.\\s]*(\\d+)[-.\\s]*(?:-|to)[-.\\s]*(\\d+)\\b", "S$1-S$2"] + - name: re_replace # Season X --> S0X + args: ["(?i)\\bSeasons?[-.\\s]*(\\d)\\b", "S0$1"] + - name: re_replace # Season XX --> SXX + args: ["(?i)\\bSeasons?[-.\\s]*(\\d+)\\b", "S$1"] details: selector: td a[href^="index.php?page=torrent-details"] attribute: href diff --git a/src/Jackett.Common/Definitions/cathoderaytube.yml b/src/Jackett.Common/Definitions/cathoderaytube.yml index e8038b6ad..c75f9f9f2 100644 --- a/src/Jackett.Common/Definitions/cathoderaytube.yml +++ b/src/Jackett.Common/Definitions/cathoderaytube.yml @@ -105,15 +105,15 @@ search: selector: a[href^="/torrents.php?id="] filters: - name: re_replace # Seasons X-Y --> S0X-S0Y - args: ["(?i)seasons?\\s*(\\d)\\s*-\\s*(\\d)\\b", "S0$1-S0$2"] + args: ["(?i)\\bSeasons?\\s*(\\d)\\s*-\\s*(\\d)\\b", "S0$1-S0$2"] - name: re_replace # Seasons X-YY --> S0X-SYY - args: ["(?i)seasons?\\s*(\\d)\\s*-\\s*(\\d+)\\b", "S0$1-S$2"] + args: ["(?i)\\bSeasons?\\s*(\\d)\\s*-\\s*(\\d+)\\b", "S0$1-S$2"] - name: re_replace # Seasons XX-YY --> SXX-SYY - args: ["(?i)seasons?\\s*(\\d+)\\s*-\\s*(\\d+)\\b", "S$1-S$2"] + args: ["(?i)\\bSeasons?\\s*(\\d+)\\s*-\\s*(\\d+)\\b", "S$1-S$2"] - name: re_replace # Season X --> S0X - args: ["(?i)season\\s*(\\d)\\b", "S0$1"] + args: ["(?i)\\bSeasons?\\s*(\\d)\\b", "S0$1"] - name: re_replace # Season XX --> SXX - args: ["(?i)season\\s*(\\d+)\\b", "S$1"] + args: ["(?i)\\bSeasons?\\s*(\\d+)\\b", "S$1"] - name: re_replace args: ["(?i)\\bComplete\\s+Series\\b", ""] details: diff --git a/src/Jackett.Common/Definitions/crt2fa.yml b/src/Jackett.Common/Definitions/crt2fa.yml index d518e9a3c..a1deba34e 100644 --- a/src/Jackett.Common/Definitions/crt2fa.yml +++ b/src/Jackett.Common/Definitions/crt2fa.yml @@ -95,15 +95,15 @@ search: selector: a[href^="/torrents.php?id="] filters: - name: re_replace # Seasons X-Y --> S0X-S0Y - args: ["(?i)seasons?\\s*(\\d)\\s*-\\s*(\\d)\\b", "S0$1-S0$2"] + args: ["(?i)\\bSeasons?\\s*(\\d)\\s*-\\s*(\\d)\\b", "S0$1-S0$2"] - name: re_replace # Seasons X-YY --> S0X-SYY - args: ["(?i)seasons?\\s*(\\d)\\s*-\\s*(\\d+)\\b", "S0$1-S$2"] + args: ["(?i)\\bSeasons?\\s*(\\d)\\s*-\\s*(\\d+)\\b", "S0$1-S$2"] - name: re_replace # Seasons XX-YY --> SXX-SYY - args: ["(?i)seasons?\\s*(\\d+)\\s*-\\s*(\\d+)\\b", "S$1-S$2"] + args: ["(?i)\\bSeasons?\\s*(\\d+)\\s*-\\s*(\\d+)\\b", "S$1-S$2"] - name: re_replace # Season X --> S0X - args: ["(?i)season\\s*(\\d)\\b", "S0$1"] + args: ["(?i)\\bSeasons?\\s*(\\d)\\b", "S0$1"] - name: re_replace # Season XX --> SXX - args: ["(?i)season\\s*(\\d+)\\b", "S$1"] + args: ["(?i)\\bSeasons?\\s*(\\d+)\\b", "S$1"] - name: re_replace args: ["(?i)\\bComplete\\s+Series\\b", ""] details: