From 29787bc3fc8115dd9f853446fadf547144cc73d0 Mon Sep 17 00:00:00 2001 From: Garfield69 Date: Wed, 16 Sep 2020 08:44:27 +1200 Subject: [PATCH] twilight: add freeleech filter #9456 add imdb search support add minimumratio --- src/Jackett.Common/Definitions/twilight.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/Jackett.Common/Definitions/twilight.yml b/src/Jackett.Common/Definitions/twilight.yml index a02212387..d779e51ad 100644 --- a/src/Jackett.Common/Definitions/twilight.yml +++ b/src/Jackett.Common/Definitions/twilight.yml @@ -33,9 +33,9 @@ caps: - {id: 36, cat: TV, desc: "Tv"} modes: - search: [q] - tv-search: [q, season, ep] - movie-search: [q] + search: [q, imdbid] + tv-search: [q, season, ep, imdbid] + movie-search: [q, imdbid] music-search: [q] settings: @@ -45,6 +45,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 @@ -83,11 +87,12 @@ search: - path: browse.php inputs: $raw: "{{ range .Categories }}c{{.}}=1&{{end}}" - search: "{{ .Keywords }}" - # 0 active 1 incldead 2 onlydead 3 freeleech - incldead: 1 + search: "{{ if .Query.IMDBID }}{{ .Query.IMDBID }}{{ else }}{{ .Keywords }}{{ end }}" + # 0 active, 1 incldead, 2 onlydead, 3 freeleech + incldead: "{{ if .Config.freeleech }}3{{ else }}1{{ end }}" sort: "{{ .Config.sort }}" type: "{{ .Config.type }}" + # does not display imdb links in results rows: selector: tr[class^="color"] @@ -142,4 +147,6 @@ search: "*": 1 uploadvolumefactor: text: 1 + minimumratio: + text: 0.51 # customised from TBDEV,U232,and Btdev