From 3d582fe8512698dd268ca38e3cd6bc73f2249aa6 Mon Sep 17 00:00:00 2001 From: Garfield69 Date: Sat, 21 Dec 2019 15:36:41 +1300 Subject: [PATCH] torrentdownload: add config sort option --- src/Jackett.Common/Definitions/torrentdownload.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/Jackett.Common/Definitions/torrentdownload.yml b/src/Jackett.Common/Definitions/torrentdownload.yml index 1b9f47712..439275f9f 100644 --- a/src/Jackett.Common/Definitions/torrentdownload.yml +++ b/src/Jackett.Common/Definitions/torrentdownload.yml @@ -24,16 +24,26 @@ tv-search: [q, season, ep] movie-search: [q] - settings: [] + settings: + - name: sort + type: select + label: Sort requested from site (Applies only to Search with Keywords) + default: "d" + options: + "d": "created" + "s": "seeders" + "_": "size" download: selector: a[href^="magnet:?xt="] search: paths: - - path: "{{if .Keywords}}searchd?q={{ .Keywords}}{{else}}latest{{end}}" + - path: "{{ if .Keywords }}search{{ re_replace .Config.sort \"_\" \"\" }}?q={{ .Keywords }}{{else}}latest{{end}}" + rows: selector: table.table2 > tbody > tr:has(span.smallish) + fields: title: selector: div.tt-name > a[href^="/"]