From 70ca19c6d90a311473f54a7e2446ba78036822c0 Mon Sep 17 00:00:00 2001 From: Garfield69 Date: Tue, 9 Jan 2018 07:40:13 +1300 Subject: [PATCH] mvgroup*: improvements to optional bbc title stripping 1. do not filter 'BBC ' from anywhere but the start of the title string 2. condense the two optional title blocks into a single title block --- src/Jackett.Common/Definitions/mvgroupforum.yml | 12 +++--------- src/Jackett.Common/Definitions/mvgroupmain.yml | 12 +++--------- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/src/Jackett.Common/Definitions/mvgroupforum.yml b/src/Jackett.Common/Definitions/mvgroupforum.yml index 68ed433ad..5e0174683 100644 --- a/src/Jackett.Common/Definitions/mvgroupforum.yml +++ b/src/Jackett.Common/Definitions/mvgroupforum.yml @@ -130,20 +130,14 @@ selector: tr:has(a.magnetlink) fields: title: - # fallback title (to prevent abend if neither optional is found) + # fallback title (to prevent abend if optional is not found) text: "title not found" title: optional: true - selector: td.singleindent a[href^="/index.php?showtopic="] + selector: td.doubleindent, td.singleindent a[href^="/index.php?showtopic="] filters: - name: re_replace - args: ["BBC (.*)", "{{ if .Config.dropbbc }}{{ else }}BBC {{ end }}$1"] - title: - optional: true - selector: td.doubleindent - filters: - - name: re_replace - args: ["BBC (.*)", "{{ if .Config.dropbbc }}{{ else }}BBC {{ end }}$1"] + args: ["^BBC (.*)", "{{ if .Config.dropbbc }}{{ else }}BBC {{ end }}$1"] details: optional: true selector: td.singleindent a[href^="/index.php?showtopic="] diff --git a/src/Jackett.Common/Definitions/mvgroupmain.yml b/src/Jackett.Common/Definitions/mvgroupmain.yml index 25d2a4c00..9477026bf 100644 --- a/src/Jackett.Common/Definitions/mvgroupmain.yml +++ b/src/Jackett.Common/Definitions/mvgroupmain.yml @@ -130,20 +130,14 @@ selector: tr:has(a.magnetlink) fields: title: - # fallback title (to prevent abend if neither optional is found) + # fallback title (to prevent abend if optional is not found) text: "title not found" title: optional: true - selector: td.singleindent a[href^="/index.php?showtopic="] + selector: td.doubleindent, td.singleindent a[href^="/index.php?showtopic="] filters: - name: re_replace - args: ["BBC (.*)", "{{ if .Config.dropbbc }}{{ else }}BBC {{ end }}$1"] - title: - optional: true - selector: td.doubleindent - filters: - - name: re_replace - args: ["BBC (.*)", "{{ if .Config.dropbbc }}{{ else }}BBC {{ end }}$1"] + args: ["^BBC (.*)", "{{ if .Config.dropbbc }}{{ else }}BBC {{ end }}$1"] details: optional: true selector: td.singleindent a[href^="/index.php?showtopic="]