mirror of https://github.com/Jackett/Jackett
torrentproject: add latest for keywordless
instead of search for .Today.Year
This commit is contained in:
parent
63e43db56b
commit
80044c656e
|
@ -60,14 +60,15 @@ download:
|
||||||
|
|
||||||
search:
|
search:
|
||||||
paths:
|
paths:
|
||||||
- path: /
|
# browse for latest, / for keywords, 50 rows per page
|
||||||
- path: /
|
- path: "{{ if .Keywords }}/{{ else }}browse{{ end }}"
|
||||||
|
- path: "{{ if .Keywords }}/{{ else }}browse{{ end }}"
|
||||||
inputs:
|
inputs:
|
||||||
p: 1
|
p: 1
|
||||||
inputs:
|
inputs:
|
||||||
t: "{{ if .Keywords }}{{ .Keywords }}{{ else }}{{ .Today.Year }}{{ end }}"
|
t: "{{ .Keywords }}"
|
||||||
orderby: "{{ .Config.sort }}"
|
orderby: "{{ if .Keywords }}{{ .Config.sort }}{{ else }}{{ end }}"
|
||||||
safe: "{{ if .Config.filter-verified }}on{{ else }}{{ end }}"
|
safe: "{{ if and .Keywords .Config.filter-verified }}on{{ else }}{{ end }}"
|
||||||
keywordsfilters:
|
keywordsfilters:
|
||||||
- name: re_replace
|
- name: re_replace
|
||||||
args: [" ", "+"]
|
args: [" ", "+"]
|
||||||
|
@ -77,6 +78,7 @@ search:
|
||||||
|
|
||||||
fields:
|
fields:
|
||||||
category:
|
category:
|
||||||
|
# while browse has cats the search does not (atm) so we wont support cats for now.
|
||||||
text: Other
|
text: Other
|
||||||
title:
|
title:
|
||||||
selector: span > a
|
selector: span > a
|
||||||
|
@ -86,9 +88,21 @@ search:
|
||||||
download:
|
download:
|
||||||
selector: span > a
|
selector: span > a
|
||||||
attribute: href
|
attribute: href
|
||||||
date:
|
date_ago:
|
||||||
# 7 years ago
|
# 7 years ago
|
||||||
selector: span:nth-child(4)
|
selector: span:nth-child(4):contains("ago")
|
||||||
|
optional: true
|
||||||
|
date_time:
|
||||||
|
# 2020-11-05 07:34:44
|
||||||
|
selector: span:nth-child(4):contains(":")
|
||||||
|
optional: true
|
||||||
|
filters:
|
||||||
|
- name: append
|
||||||
|
args: " -07:00" # PDT
|
||||||
|
- name: dateparse
|
||||||
|
args: "yyyy-MM-dd HH:mm:ss zzz"
|
||||||
|
date:
|
||||||
|
text: "{{ if or .Result.date_ago .Result.date_time }}{{ or .Result.date_ago .Result.date_time }}{{ else }}now{{ end }}"
|
||||||
size:
|
size:
|
||||||
selector: span:nth-child(5)
|
selector: span:nth-child(5)
|
||||||
seeders:
|
seeders:
|
||||||
|
|
Loading…
Reference in New Issue