Skip to content

Commit

Permalink
hush: add config multi option. #9544
Browse files Browse the repository at this point in the history
untested
  • Loading branch information
garfield69 committed Sep 19, 2020
1 parent e6da7cf commit 2274f5d
Showing 1 changed file with 36 additions and 1 deletion.
37 changes: 36 additions & 1 deletion src/Jackett.Common/Definitions/hush.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,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

login:
path: login
Expand Down Expand Up @@ -89,8 +108,24 @@ search:
filters:
- name: regexp
args: "/categories/.*?\\.(\\d+)"
title:
title_phase1:
selector: a.view-torrent
title_multilang:
text: "{{ .Result.title_phase1 }}"
filters:
- name: re_replace
args: ["(?i)(\\smulti\\s)", " {{ .Config.multilanguage }} "]
title_phase2:
text: "{{ if .Config.multilang }}{{ .Result.title_multilang }}{{ else }}{{ .Result.title_phase1 }}{{ end }}"
title_vostfr:
text: "{{ .Result.title_phase2 }}"
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_phase2 }}{{ end }}"
download:
selector: a[href*="/download/"]
attribute: href
Expand Down

0 comments on commit 2274f5d

Please sign in to comment.