Skip to content

Commit

Permalink
ptfiles: add freeleech filter #9456
Browse files Browse the repository at this point in the history
add minimumratio and minimumseedtime
  • Loading branch information
garfield69 committed Sep 14, 2020
1 parent ae0e15d commit 8528383
Showing 1 changed file with 20 additions and 10 deletions.
30 changes: 20 additions & 10 deletions src/Jackett.Common/Definitions/ptfiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}"

Expand Down Expand Up @@ -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

0 comments on commit 8528383

Please sign in to comment.