diff --git a/src/Jackett.Common/Definitions/ptfiles.yml b/src/Jackett.Common/Definitions/ptfiles.yml index 4c9cef481..bea4472a8 100644 --- a/src/Jackett.Common/Definitions/ptfiles.yml +++ b/src/Jackett.Common/Definitions/ptfiles.yml @@ -47,6 +47,10 @@ settings: - name: password type: password label: Password + - name: freeleech + type: checkbox + label: Search freeleech only + default: false - name: sort type: select label: Sort requested from site @@ -71,24 +75,26 @@ login: inputs: username: "{{ .Config.username }}" password: "{{ .Config.password }}" - force_ssl: "on" + force_ssl: on ssl: "" error: - - selector: "p.error:contains(strong)" + - selector: p.error:contains(strong) test: path: browse.php search: paths: # https://ptfiles.net/browse.php?search=tt3612126&incldead=1&title=1 + # https://ptfiles.net/browse.php?free=1&search=&incldead=1&title=0 - path: browse.php inputs: $raw: "{{ range .Categories }}c{{.}}=1&{{end}}" - search: "{{ if .Query.IMDBID }}{{ .Query.IMDBID }}{{else}}{{ .Keywords }}{{end}}" - # 0 active 1 both 2 dead 3 needseed + search: "{{ if .Query.IMDBID }}{{ .Query.IMDBID }}{{ else }}{{ .Keywords }}{{ end }}" + # 0 active, 1 both, 2 dead, 3 needseed incldead: 0 - # 0 title 1 descr 2 both 3 genre - title: "{{ if .Query.IMDBID }}1{{else}}0{{end}}" + # 0 title, 1 descr, 2 both, 3 genre + title: "{{ if .Query.IMDBID }}1{{ else }}0{{ end }}" + free: "{{ if .Config.freeleech }}1{{ else }}{{ end }}" sort: "{{ .Config.sort }}" type: "{{ .Config.type }}" @@ -144,15 +150,19 @@ search: args: ["Uploaded: ", ""] downloadvolumefactor: case: - "span.tool:contains(\"[FREE]\")": "0" - "*": "1" + "span.tool:contains(\"[FREE]\")": 0 + "*": 1 uploadvolumefactor: - case: - "*": "1" + text: 1 description: selector: td:nth-child(2) > span:has(span > small) remove: span:nth-child(1), span.tool, a[title^="Search all"], br ~ b > small filters: - name: trim args: "/" + minimumratio: + text: 1.0 + minimumseedtime: + # 2 days (as seconds = 2 x 24 x 60 x 60) + text: 172800 # TBDev Custom