From ff4c192a012ef17d72abc7462ce2766f37da33c5 Mon Sep 17 00:00:00 2001 From: Garfield69 Date: Wed, 18 Dec 2019 17:58:38 +1300 Subject: [PATCH] p2pbg: add config sort options --- src/Jackett.Common/Definitions/p2pbg.yml | 32 ++++++++++++++++++------ 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/src/Jackett.Common/Definitions/p2pbg.yml b/src/Jackett.Common/Definitions/p2pbg.yml index 9d9a1627d..dd85da58d 100644 --- a/src/Jackett.Common/Definitions/p2pbg.yml +++ b/src/Jackett.Common/Definitions/p2pbg.yml @@ -73,6 +73,20 @@ type: info label: "Search results" default: "For best results, increase the torrents number in your profile to 100.
Default is 15." + - name: sort + type: select + label: Sort requested from site + default: "data" + options: + "data": "created" + "size": "size" + - name: type + type: select + label: Order requested from site + default: "DESC" + options: + "DESC": "desc" + "ASC": "asc" login: path: index.php?page=login @@ -85,20 +99,24 @@ - selector: td.lista span[style="color:#FF0000;"] test: path: index.php - selector: :has(a[href="logout.php"]) + selector: a[href="logout.php"] search: paths: # http://p2pbg.com/index.php?page=torrents&search=%D0%9A%D0%B0%D1%82%D0%BE&category=0&active=0 - path: index.php inputs: - page: "torrents" - category: "{{if .Categories }}{{range .Categories}}{{.}};{{end}}{{else}}0;{{end}}" - search: "{{if .Keywords }}{{.Keywords}}{{else}}{{end}}" - active: "1" + page: torrents + category: "{{ if .Categories }}{{ range .Categories }}{{.}};{{end}}{{else}}0;{{end}}" + search: "{{ if .Keywords }}{{ .Keywords }}{{else}}{{end}}" + # 0 all 1 active 2 dead + active: 0 + order: "{{ .Config.sort }}" + by: "{{ .Config.type }}" rows: selector: table.lista tr td table.lista tr:has(a[href^="index.php?page=torrent-details"]) + fields: title: selector: td a[onclick] @@ -164,6 +182,6 @@ grabs: selector: td:nth-child(10) downloadvolumefactor: - text: "0" + text: 0 uploadvolumefactor: - text: "1" + text: 1