From edcb2cc6f83052b78bc631d12ded29fa7bce2de0 Mon Sep 17 00:00:00 2001 From: Garfield69 Date: Wed, 18 Dec 2019 06:45:06 +1300 Subject: [PATCH] metaltracker: add config sort options --- .../Definitions/metaltracker.yml | 38 ++++++++++++++++--- 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/src/Jackett.Common/Definitions/metaltracker.yml b/src/Jackett.Common/Definitions/metaltracker.yml index 08c45dee0..a70bc827d 100644 --- a/src/Jackett.Common/Definitions/metaltracker.yml +++ b/src/Jackett.Common/Definitions/metaltracker.yml @@ -20,13 +20,37 @@ search: [q] music-search: [q, album, artist, label, year] + settings: + - name: username + type: text + label: Username + - name: password + type: password + label: Password + - name: sort + type: select + label: Sort requested from site + default: "date" + options: + "date": "created" + "seeders": "seeders" + "size": "size" + "name": "title" + - name: type + type: select + label: Order requested from site + default: "DESC" + options: + "DESC": "desc" + "ASC": "asc" + login: path: user/login.html method: post inputs: username: "{{ .Config.username }}" password: "{{ .Config.password }}" - go: "Enter" + go: Enter error: - selector: div.errorSummary message: @@ -40,8 +64,10 @@ - path: torrents/search.html method: post inputs: - "SearchTorrentsForm[nameTorrent]": "{{if .Query.Artist}}{{ .Query.Artist }}{{else}}{{ .Keywords }}{{end}}" - go-search: "Search" + "SearchTorrentsForm[nameTorrent]": "{{ if .Query.Artist }}{{ .Query.Artist }}{{else}}{{ .Keywords }}{{end}}" + "SearchTorrentsForm[sort]": "{{ .Config.sort }}" + "SearchTorrentsForm[sortType]": "{{ .Config.type }}" + go-search: Search rows: selector: .smallalbum fields: @@ -57,15 +83,15 @@ selector: .center a[href^="/torrents/download/id/"] attribute: href date: - text: "now" + text: now seeders: selector: .center font:nth-of-type(1) leechers: selector: .center font:nth-of-type(2) downloadvolumefactor: - text: "0" + text: 0 uploadvolumefactor: - text: "1" + text: 1 category: selector: .smallalbum remove: div.thumb, div.center, a