sharewood: add config multi option. #9544 #9456

add freeleech filter
add minimumratio and minimumseedtime
This commit is contained in:
Garfield69 2020-09-18 12:54:40 +12:00
parent 6dea816b78
commit 98c4b1d2d7
1 changed files with 46 additions and 1 deletions

View File

@ -60,6 +60,29 @@ settings:
- name: password
type: password
label: Password
- name: freeleech
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
@ -113,6 +136,7 @@ search:
sorting: "{{ .Config.sort }}"
direction: "{{ .Config.type }}"
qty: 100
freeleech: "{{ if .Config.freeleech }}1{{ else }}{{ end }}"
rows:
selector: div.table-responsive-line
@ -124,8 +148,24 @@ search:
filters:
- name: regexp
args: "/img/NewIcones/(.+?).png"
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.view-torrent
attribute: href
@ -168,4 +208,9 @@ search:
case:
"span.badge-extra:contains('Double Upload')": 2
"*": 1
minimumratio:
text: 0.75
minimumseedtime:
# 3 days (as seconds = 3 x 24 x 60 x 60)
text: 259200
# UNIT3D