From 232330bc7a79fb83c01def7f996521d1678c15c7 Mon Sep 17 00:00:00 2001 From: Garfield69 Date: Fri, 18 Sep 2020 16:45:45 +1200 Subject: [PATCH] crazyspirits: add config multi option. #9544 handle abbreviated titles by using youtube link if available --- .../Definitions/crazyspirits.yml | 48 ++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/src/Jackett.Common/Definitions/crazyspirits.yml b/src/Jackett.Common/Definitions/crazyspirits.yml index 9de645e97..f3b762191 100644 --- a/src/Jackett.Common/Definitions/crazyspirits.yml +++ b/src/Jackett.Common/Definitions/crazyspirits.yml @@ -117,6 +117,25 @@ settings: type: checkbox label: Search freeleech only default: false + - name: multilang + type: checkbox + label: Replace MULTI by another language in release name + default: false + - name: multilanguage + type: select + label: Replace MULTI by this language + default: FRENCH + options: + FRENCH: "FRENCH" + MULTI.FRENCH: "MULTI.FRENCH" + ENGLISH: "ENGLISH" + MULTI.ENGLISH: "MULTI.ENGLISH" + VOSTFR: "VOSTFR" + MULTI.VOSTFR: "MULTI.VOSTFR" + - name: vostfr + type: checkbox + label: Replace VOSTFR with ENGLISH + default: false - name: sort type: select label: Sort requested from site @@ -174,8 +193,35 @@ search: selector: table.border_table > tbody > tr.t-row fields: - title: + title_phase0: + # title can be abbreviated selector: a[href^="torrents-details.php?id="] b + title_phase1: + # if available, the youtube link has a full title + selector: a[rel="prettyPhoto"] img + attribute: alt + optional: true + filters: + - name: replace + args: ["-NoTag", ""] + title_phase2: + text: "{{ if .Result.title_phase1 }}{{ .Result.title_phase1 }}{{ else }}{{ .Result.title_phase0 }}{{ end }}" + title_multilang: + text: "{{ .Result.title_phase2 }}" + filters: + - name: re_replace + args: ["(?i)(\\smulti\\s)", " {{ .Config.multilanguage }} "] + title_phase3: + text: "{{ if .Config.multilang }}{{ .Result.title_multilang }}{{ else }}{{ .Result.title_phase2 }}{{ end }}" + title_vostfr: + text: "{{ .Result.title_phase3 }}" + filters: + - name: re_replace + args: ["(?i)(\\svostfr\\s)", " ENGLISH "] + - name: re_replace + args: ["(?i)(\\ssubfrench\\s)", " ENGLISH "] + title: + text: "{{ if .Config.vostfr }}{{ .Result.title_vostfr }}{{ else }}{{ .Result.title_phase3 }}{{ end }}" category: selector: a[href^="torrents.php?cat="] attribute: href