torlock, torrentdownloads: freeleech. resolves #6599

torlock: add config sort option.
This commit is contained in:
Garfield69 2019-12-14 09:54:14 +13:00
parent 4fb6a4f28d
commit fc360a9770
2 changed files with 27 additions and 9 deletions

View File

@ -30,11 +30,26 @@
tv-search: [q, season, ep]
movie-search: [q]
settings: []
settings:
- name: sort
type: select
label: Sort requested from site (only works for search with keywords)
default: "added"
options:
"added": "created"
"seeds": "seeders"
"size": "size"
- name: type
type: select
label: Order requested from site
default: "desc"
options:
"desc": "desc"
"asc": "asc"
search:
paths:
- path: "{{if .Keywords}}/all/torrents/{{ .Keywords }}.html{{else}}/fresh.html{{end}}"
- path: "{{if .Keywords}}/all/torrents/{{ .Keywords }}.html?sort={{ .Config.sort }}&order={{ .Config.type }}{{else}}/fresh.html{{end}}"
# - path: "{{if .Keywords}}/television/torrents/{{ .Keywords }}.html{{else}}/television/1/added/desc.html{{end}}"
# categorymappings: [TELEVISION]
# - path: "{{if .Keywords}}/movies/torrents/{{ .Keywords }}.html{{else}}/movies/1/added/desc.html{{end}}"
@ -61,10 +76,12 @@
- name: tolower
- name: re_replace
args: ["[^a-zA-Z0-9]+", "-"]
rows:
selector: table > tbody > tr:has(td:has(div:has(a[href^="/torrent/"])))
filters:
- name: andmatch
fields:
title:
selector: td:nth-child(1) > div > a
@ -109,6 +126,6 @@
span.tv12: AUDIOBOOK
"*": "" # some torrents have invalid categories
downloadvolumefactor:
text: "1"
text: 0
uploadvolumefactor:
text: "1"
text: 1

View File

@ -24,7 +24,7 @@
search: [q]
tv-search: [q, season, ep]
movie-search: [q]
settings:
- name: downloadlink
type: select
@ -34,18 +34,19 @@
"http://itorrents.org/" : "iTorrents.org"
"magnet:": "magnet"
download:
selector: a[href^="{{ .Config.downloadlink }}"]
search:
paths:
- path: "{{if .Keywords}}/search/{{else}}/today/{{end}}"
inputs:
$raw: "new=1&{{range .Categories}}s_cat={{.}}&{{end}}"
search: "{{ .Keywords }}"
rows:
selector: div.inner_container > div:has(p:has(a[href^="/torrent/"]))
fields:
title:
selector: p:nth-child(1) > a
@ -70,6 +71,6 @@
- name: regexp
args: ([\d,]+)
downloadvolumefactor:
text: "1"
text: 0
uploadvolumefactor:
text: "1"
text: 1