solidtorrents: add config sort option

This commit is contained in:
Garfield69
2019-12-20 20:02:19 +13:00
parent c4f3de644d
commit cbb338a52e

View File

@@ -28,14 +28,24 @@
tv-search: [q, season, ep] tv-search: [q, season, ep]
movie-search: [q] movie-search: [q]
settings: [] settings:
- name: sort
type: select
label: Sort requested from site
default: "date"
options:
"date": "created"
"seeders": "seeders"
"size": "size"
search: search:
paths: paths:
# https://solidtorrents.net/search?q=gotham%20s05e02&sort=date&category=all # https://solidtorrents.net/search?q=gotham%20s05e02&sort=date&category=all
- path: "search?q={{.Keywords}}&sort=date&category=all" - path: "search?q={{ .Keywords }}&sort={{ .Config.sort }}&category=all"
rows: rows:
selector: div[role="listitem"]:has(a[href^="magnet:?xt="]) selector: div[role="listitem"]:has(a[href^="magnet:?xt="])
fields: fields:
title: title:
selector: div[class$="__title"] a[title] selector: div[class$="__title"] a[title]
@@ -51,6 +61,8 @@
filters: filters:
- name: regexp - name: regexp
args: "(.+?) \\|" args: "(.+?) \\|"
size:
selector: div.v-list__tile__sub-title:last-of-type strong
date: date:
selector: div.v-list__tile__content div:nth-of-type(2) selector: div.v-list__tile__content div:nth-of-type(2)
filters: filters:
@@ -62,15 +74,13 @@
args: ["a ", "1 "] args: ["a ", "1 "]
- name: regexp - name: regexp
args: "(\\d+ \\w+ \\w+)" args: "(\\d+ \\w+ \\w+)"
grabs:
selector: div.v-list__tile__sub-title span:last-of-type
seeders: seeders:
selector: div.v-list__tile__sub-title span.green--text selector: div.v-list__tile__sub-title span.green--text
leechers: leechers:
selector: div.v-list__tile__sub-title span.red--text selector: div.v-list__tile__sub-title span.red--text
grabs:
selector: div.v-list__tile__sub-title span:last-of-type
size:
selector: div.v-list__tile__sub-title:last-of-type strong
downloadvolumefactor: downloadvolumefactor:
text: "0" text: 0
uploadvolumefactor: uploadvolumefactor:
text: "1" text: 1