audiobooktorrents: add freeleech filter #9456

and fix freeleech display
This commit is contained in:
Garfield69 2020-09-10 19:37:50 +12:00
parent aebcbe2ea1
commit 1d231d5ba5
1 changed files with 9 additions and 1 deletions

View File

@ -85,6 +85,10 @@ settings:
- name: password - name: password
type: password type: password
label: Password label: Password
- name: freeleech
type: checkbox
label: Search freeleech only
default: false
- name: info_results - name: info_results
type: info type: info
label: Search results label: Search results
@ -111,8 +115,12 @@ search:
inputs: inputs:
$raw: "{{range .Categories}}c{{.}}=1&{{end}}" $raw: "{{range .Categories}}c{{.}}=1&{{end}}"
search: "{{ .Keywords }}" search: "{{ .Keywords }}"
# title, descr
searchin: title searchin: title
# 0 active, 1 incldead, 2 onlydead
incldead: 1 incldead: 1
# 1 onlyfree, null all
only_free: "{{ if .Config.freeleech }}1{{ else }}{{ end }}"
rows: rows:
selector: table.table-striped > tbody > tr:has(a[href^="download.php?torrent="]) selector: table.table-striped > tbody > tr:has(a[href^="download.php?torrent="])
@ -152,7 +160,7 @@ search:
selector: td:nth-last-child(3) selector: td:nth-last-child(3)
downloadvolumefactor: downloadvolumefactor:
case: case:
"a.info > b:contains(\"[FREE]\")": 0 tr.freeleech_color: 0
"*": 1 "*": 1
uploadvolumefactor: uploadvolumefactor:
text: 1 text: 1