hon3yhd: add freeleech filter #9456

This commit is contained in:
Garfield69 2020-09-12 18:57:50 +12:00
parent 40e821be1a
commit 2f64376be2
1 changed files with 15 additions and 0 deletions

View File

@ -55,6 +55,18 @@ caps:
movie-search: [q] movie-search: [q]
music-search: [q] music-search: [q]
settings:
- name: username
type: text
label: Username
- name: password
type: password
label: Password
- name: freeleech
type: checkbox
label: Search freeleech only
default: false
login: login:
path: login.php path: login.php
method: form method: form
@ -78,14 +90,17 @@ search:
searchin: title searchin: title
# 0 active, 1 incldead, 2 onlydead # 0 active, 1 incldead, 2 onlydead
incldead: 1 incldead: 1
only_free: "{{ if .Config.freeleech }}1{{ else }}{{ end }}"
keywordsfilters: keywordsfilters:
# by default the search returns unordered resuts of an OR query making the results useless in many cases, adding + to the keywords improves the situation (Issue #1859) # by default the search returns unordered resuts of an OR query making the results useless in many cases, adding + to the keywords improves the situation (Issue #1859)
- name: re_replace # replace special characters with " +" - name: re_replace # replace special characters with " +"
args: ["[^\\w\\d]+", " +"] args: ["[^\\w\\d]+", " +"]
- name: prepend - name: prepend
args: "+" args: "+"
rows: rows:
selector: table > tbody > tr.tt selector: table > tbody > tr.tt
fields: fields:
title: title:
selector: a[href^="details.php?id="] selector: a[href^="details.php?id="]