nyaa-pantsu: refresh categories

add config sort options
This commit is contained in:
Garfield69
2019-12-18 15:46:07 +13:00
parent 29d64294d9
commit 77ddc9dd2f

View File

@@ -34,41 +34,68 @@
4_: "Literature"
4_7: "Literature - English-translated"
4_14: "Literature - Non-English-translated"
4_14: "Literature - Raw"
4_8: "Literature - Raw"
1_: "Software"
1_1: "Software - Applications"
1_2: "Software - Games"
- name: filter-id
5_: "Live Action"
5_10: "Live Action - Trailers"
5_9: "Live Action - English subtitled"
5_18: "Live Action - Non-English subtitled"
5_11: "Live Action - Raw"
6_: "Pictures"
6_15: "Pictures - Graphics"
6_16: "Pictures - Photos"
- name: sort
type: select
label: Filter
default: "0"
label: Sort requested from site
default: "2"
options:
0: "Show all"
1: "Filter Remakes"
2: "Trusted"
3: "A+"
"2": "created"
"5": "seeders"
"4": "size"
"1": "title"
- name: type
type: select
label: Order requested from site
default: "false"
options:
"false": "desc"
"true": "asc"
caps:
categorymappings:
# Anime
- {id: 3_, cat: TV/Anime, desc: "Anime"}
- {id: 3_, cat: TV/Anime, desc: "Anime"}
- {id: 3_12, cat: TV/Anime, desc: "Anime music videos"}
- {id: 3_5, cat: TV/Anime, desc: "English subtitled animes"}
- {id: 3_13, cat: TV/Anime, desc: "Non-english subtitled animes"}
- {id: 3_6, cat: TV/Anime, desc: "Raw animes"}
- {id: 3_5, cat: TV/Anime, desc: "Anime English subtitled"}
- {id: 3_13, cat: TV/Anime, desc: "Anime Non-English subtitled"}
- {id: 3_6, cat: TV/Anime, desc: "Anime Raw"}
# Audio
- {id: 2_, cat: Audio, desc: "Audio"}
- {id: 2_3, cat: Audio, desc: "Lossless audio"}
- {id: 2_4, cat: Audio, desc: "Lossy audio"}
- {id: 2_, cat: Audio, desc: "Audio"}
- {id: 2_3, cat: Audio, desc: "Audio Lossless"}
- {id: 2_4, cat: Audio, desc: "Audio Lossy"}
# Literature
- {id: 4_, cat: Books, desc: "Literature"}
- {id: 4_7, cat: Books, desc: "Literature english translated"}
- {id: 4_14, cat: Books, desc: "Literature non-english translated"}
- {id: 4_8, cat: Books, desc: "Raw literature"}
- {id: 4_, cat: Books, desc: "Literature"}
- {id: 4_7, cat: Books, desc: "Literature English translated"}
- {id: 4_14, cat: Books, desc: "Literature non-English translated"}
- {id: 4_8, cat: Books, desc: "Literature Raw"}
# Software
- {id: 1_, cat: PC, desc: "Software"}
- {id: 1_1, cat: PC/ISO, desc: "Applications"}
- {id: 1_2, cat: PC/Games, desc: "Games"}
- {id: 1_, cat: PC, desc: "Software"}
- {id: 1_1, cat: PC/ISO, desc: "Applications"}
- {id: 1_2, cat: PC/Games, desc: "Games"}
# live action
- {id: 5_, cat: TV, desc: "Live Action"}
- {id: 5_10, cat: TV, desc: "Live Action Trailers"}
- {id: 5_9, cat: TV, desc: "Live Action English subtitled"}
- {id: 5_18, cat: TV, desc: "Live Action Non-English subtitled"}
- {id: 5_11, cat: TV, desc: "Live Action Raw"}
# pictures
- {id: 6_, cat: Other, desc: "Pictures"}
- {id: 6_15, cat: Other, desc: "Pictures Graphics"}
- {id: 6_16, cat: Other, desc: "Pictures Photos"}
modes:
search: [q]
tv-search: [q]
@@ -77,11 +104,16 @@
paths:
- path: search
inputs:
q: "{{ .Query.Keywords }}"
q: "{{ .Keywords }}"
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:
selector: tr.torrent-info
fields:
title:
selector: td.tr-name a
@@ -97,12 +129,18 @@
download:
selector: a[title="Magnet Link"]
attribute: href
seeders:
text: 0
seeders:
selector: td.tr-se
optional: true
leechers:
text: 0
leechers:
selector: td.tr-le
optional: true
grabs:
text: 0
grabs:
selector: td.tr-dl
optional: true
@@ -117,6 +155,6 @@
- name: replace
args: ["Unknown", "0"]
downloadvolumefactor:
text: "0"
text: 0
uploadvolumefactor:
text: "1"
text: 1