sukebei-pantsu: add config sort options

This commit is contained in:
Garfield69 2019-12-20 20:25:04 +13:00
parent 6e71e32185
commit a5a5821e84
1 changed files with 30 additions and 11 deletions

View File

@ -31,15 +31,22 @@
2_: "Real Life" 2_: "Real Life"
2_1: "Real Life - Photobooks and Pictures" 2_1: "Real Life - Photobooks and Pictures"
2_2: "Real Life - Videos" 2_2: "Real Life - Videos"
- name: filter-id - name: sort
type: select type: select
label: Filter label: Sort requested from site
default: "0" default: "2"
options: options:
0: "Show all" "2": "created"
1: "Filter Remakes" "5": "seeders"
2: "Trusted" "4": "size"
3: "A+" "1": "title"
- name: type
type: select
label: Order requested from site
default: "false"
options:
"false": "desc"
"true": "asc"
caps: caps:
categorymappings: categorymappings:
@ -54,6 +61,7 @@
- {id: 2_, cat: XXX, desc: "Adult Real Life"} - {id: 2_, cat: XXX, desc: "Adult Real Life"}
- {id: 2_1, cat: XXX, desc: "Adult Photobooks and Pictures"} - {id: 2_1, cat: XXX, desc: "Adult Photobooks and Pictures"}
- {id: 2_2, cat: XXX, desc: "Adult Videos"} - {id: 2_2, cat: XXX, desc: "Adult Videos"}
modes: modes:
search: [q] search: [q]
tv-search: [q] tv-search: [q]
@ -62,11 +70,16 @@
paths: paths:
- path: search - path: search
inputs: inputs:
q: "{{ .Query.Keywords }}" q: "{{ .Keywords }}"
c: "{{ .Config.cat-id }}" c: "{{ .Config.cat-id }}"
s: "{{ .Config.filter-id }}" # 0 all 1 remakes 2 trusted 3 A+
s: 0
sort: "{{ .Config.sort }}"
order: "{{ .Config.type }}"
rows: rows:
selector: tr.torrent-info selector: tr.torrent-info
fields: fields:
title: title:
selector: td.tr-name a selector: td.tr-name a
@ -82,12 +95,18 @@
download: download:
selector: a[title="Magnet Link"] selector: a[title="Magnet Link"]
attribute: href attribute: href
seeders:
text: 0
seeders: seeders:
selector: td.tr-se selector: td.tr-se
optional: true optional: true
leechers:
text: 0
leechers: leechers:
selector: td.tr-le selector: td.tr-le
optional: true optional: true
grabs:
text: 0
grabs: grabs:
selector: td.tr-dl selector: td.tr-dl
optional: true optional: true
@ -102,6 +121,6 @@
- name: replace - name: replace
args: ["Unknown", "0"] args: ["Unknown", "0"]
downloadvolumefactor: downloadvolumefactor:
text: "0" text: 0
uploadvolumefactor: uploadvolumefactor:
text: "1" text: 1