twilight: add freeleech filter #9456

add imdb search support
add minimumratio
This commit is contained in:
Garfield69 2020-09-16 08:44:27 +12:00
parent f8c34e4c72
commit 29787bc3fc
1 changed files with 13 additions and 6 deletions

View File

@ -33,9 +33,9 @@ caps:
- {id: 36, cat: TV, desc: "Tv"}
modes:
search: [q]
tv-search: [q, season, ep]
movie-search: [q]
search: [q, imdbid]
tv-search: [q, season, ep, imdbid]
movie-search: [q, imdbid]
music-search: [q]
settings:
@ -45,6 +45,10 @@ settings:
- name: password
type: password
label: Password
- name: freeleech
type: checkbox
label: Search freeleech only
default: false
- name: sort
type: select
label: Sort requested from site
@ -83,11 +87,12 @@ search:
- path: browse.php
inputs:
$raw: "{{ range .Categories }}c{{.}}=1&{{end}}"
search: "{{ .Keywords }}"
# 0 active 1 incldead 2 onlydead 3 freeleech
incldead: 1
search: "{{ if .Query.IMDBID }}{{ .Query.IMDBID }}{{ else }}{{ .Keywords }}{{ end }}"
# 0 active, 1 incldead, 2 onlydead, 3 freeleech
incldead: "{{ if .Config.freeleech }}3{{ else }}1{{ end }}"
sort: "{{ .Config.sort }}"
type: "{{ .Config.type }}"
# does not display imdb links in results
rows:
selector: tr[class^="color"]
@ -142,4 +147,6 @@ search:
"*": 1
uploadvolumefactor:
text: 1
minimumratio:
text: 0.51
# customised from TBDEV,U232,and Btdev