Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: validate yaml definitions (go templates) #8597

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions src/Jackett.Common/Definitions/0daykiev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,14 @@ search:
- name: re_replace # S01E01 to Сезон 1 Серии 1
args: ["(?i)\\bS0*(\\d+)E0*(\\d+)\\b", "езон $1 ерии $2"]
inputs:
$raw: "{{range .Categories}}c{{.}}=1&{{end}}"
$raw: "{{ range .Categories }}c{{ . }}=1&{{ end }}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the current Cardigann code will not accept any variation, returning (with slightly different keys)

Jackett.Common.IndexerException: Exception (0daykiev): The given key '. ' was not present in the dictionary.
 ---> System.Collections.Generic.KeyNotFoundException: The given key '. ' was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at Jackett.Common.Indexers.CardigannIndexer.applyGoTemplateText(String template, Dictionary`2 variables, TemplateTextModifier modifier) in d:\a\1\s\src\Jackett.Common\Indexers\CardigannIndexer.cs:line 441
   at Jackett.Common.Indexers.CardigannIndexer.PerformQuery(TorznabQuery query) in d:\a\1\s\src\Jackett.Common\Indexers\CardigannIndexer.cs:line 1302
   at Jackett.Common.Indexers.BaseIndexer.ResultsForQuery(TorznabQuery query) in d:\a\1\s\src\Jackett.Common\Indexers\BaseIndexer.cs:line 323
   --- End of inner exception stack trace ---
   at Jackett.Common.Indexers.BaseIndexer.ResultsForQuery(TorznabQuery query) in d:\a\1\s\src\Jackett.Common\Indexers\BaseIndexer.cs:line 343
   at Jackett.Common.Indexers.BaseWebIndexer.ResultsForQuery(TorznabQuery query) in d:\a\1\s\src\Jackett.Common\Indexers\BaseIndexer.cs:line 799
   at Jackett.Server.Controllers.ResultsController.Results(ApiSearch requestt) in d:\a\1\s\src\Jackett.Server\Controllers\ResultsController.cs:line 224

for any of the following

$raw: "{{ range .Categories }}c{{ . }}=1&{{ end }}"
$raw: "{{ range .Categories }}c{{. }}=1&{{ end }}"
$raw: "{{ range .Categories }}c{{ .}}=1&{{ end }}"
$raw: "{{ range .Categories }}c{{ . }}=1&{{end}}"
$raw: "{{ range .Categories }}c{{ .}}=1&{{end}}"
$raw: "{{ range .Categories }}c{{. }}=1&{{end}}"
$raw: "{{ range .Categories }}c{{.}}=1&{{ end }}"
$raw: "{{ range .Categories }}c{{.}}=1&{{end }}"

the late variation returned The given key '.}}=1&{{end' was not present in the dictionary.

only

`$raw: "{{ range .Categories }}c{{.}}=1&{{end}}"`

is accepted.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you prefer the current implementation c{{.}}=1&{{end}} or with spaces c{{ . }}=1&{{ end }}?
I don't care, you are in charge or this part. I can make the changes in Cardigann if required.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to me that the current implementation of the range .Categories is out of step with what Cardigann does with the other templates, so yes, if you can amend Cardigann to handle spaces when processing the range then that is a worth doing. Thanks.

search: "{{ .Keywords }}"
# 0 active 1 incldead 2 onlydead 3 gold 4 noseed 5 silver
incldead: 1
# 0 title 1 title and descr
where: 0
sort: "{{ .Config.sort}}"
type: "{{ .Config.type}}"
sort: "{{ .Config.sort }}"
type: "{{ .Config.type }}"

rows:
selector: table > tbody > tr.rowtorrentinfo
Expand Down
6 changes: 3 additions & 3 deletions src/Jackett.Common/Definitions/1337x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ download:
search:
paths:
# present first page of movies tv and music results if there are no search parms supplied (20 hits per page)
- path: "{{if or (.Query.Album) (.Query.Artist) (.Keywords) }}sort-search{{else}}cat/Movies{{end}}{{if or (.Query.Album) (.Query.Artist) }}/{{ or (.Query.Album) (.Query.Artist) }}{{else}}/{{ .Keywords }}{{end}}{{if or (.Query.Album) (.Query.Artist) (.Keywords) }}/{{else}}{{end}}{{ .Config.sort }}/{{ .Config.type }}/1/"
- path: "{{if or (.Query.Album) (.Query.Artist) (.Keywords) }}sort-search{{else}}cat/TV{{end}}{{if or (.Query.Album) (.Query.Artist) }}/{{ or (.Query.Album) (.Query.Artist) }}{{else}}/{{ .Keywords }}{{end}}{{if or (.Query.Album) (.Query.Artist) (.Keywords) }}/{{else}}{{end}}{{ .Config.sort }}/{{ .Config.type }}/{{if or (.Query.Album) (.Query.Artist) (.Keywords) }}2{{else}}1{{end}}/"
- path: "{{if or (.Query.Album) (.Query.Artist) (.Keywords) }}sort-search{{else}}cat/Music{{end}}{{if or (.Query.Album) (.Query.Artist) }}/{{ or (.Query.Album) (.Query.Artist) }}{{else}}/{{ .Keywords }}{{end}}{{if or (.Query.Album) (.Query.Artist) (.Keywords) }}/{{else}}{{end}}{{ .Config.sort }}/{{ .Config.type }}/{{if or (.Query.Album) (.Query.Artist) (.Keywords) }}3{{else}}1{{end}}/"
- path: "{{ if or (.Query.Album) (.Query.Artist) (.Keywords) }}sort-search{{ else }}cat/Movies{{ end }}{{ if or (.Query.Album) (.Query.Artist) }}/{{ or (.Query.Album) (.Query.Artist) }}{{ else }}/{{ .Keywords }}{{ end }}{{ if or (.Query.Album) (.Query.Artist) (.Keywords) }}/{{ else }}{{ end }}{{ .Config.sort }}/{{ .Config.type }}/1/"
- path: "{{ if or (.Query.Album) (.Query.Artist) (.Keywords) }}sort-search{{ else }}cat/TV{{ end }}{{ if or (.Query.Album) (.Query.Artist) }}/{{ or (.Query.Album) (.Query.Artist) }}{{ else }}/{{ .Keywords }}{{ end }}{{ if or (.Query.Album) (.Query.Artist) (.Keywords) }}/{{ else }}{{ end }}{{ .Config.sort }}/{{ .Config.type }}/{{ if or (.Query.Album) (.Query.Artist) (.Keywords) }}2{{ else }}1{{ end }}/"
- path: "{{ if or (.Query.Album) (.Query.Artist) (.Keywords) }}sort-search{{ else }}cat/Music{{ end }}{{ if or (.Query.Album) (.Query.Artist) }}/{{ or (.Query.Album) (.Query.Artist) }}{{ else }}/{{ .Keywords }}{{ end }}{{ if or (.Query.Album) (.Query.Artist) (.Keywords) }}/{{ else }}{{ end }}{{ .Config.sort }}/{{ .Config.type }}/{{ if or (.Query.Album) (.Query.Artist) (.Keywords) }}3{{ else }}1{{ end }}/"
keywordsfilters:
- name: replace # use this as a workaround till #893 is implemented
args: ["Greys Anatomy", "Grey's Anatomy"]
Expand Down
6 changes: 3 additions & 3 deletions src/Jackett.Common/Definitions/2fast4you.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,16 +125,16 @@ search:
paths:
- path: torrents-search.php
inputs:
$raw: "{{range .Categories}}c{{.}}=1&{{end}}"
$raw: "{{ range .Categories }}c{{ . }}=1&{{ end }}"
search: "{{ .Keywords }}"
# 0 active 1 incldead 2 onlydead
incldead: 1
# 0 all 1 notfree 2 onlyfree
freeleech: 0
# 0 any 1 French 2 English 3 Multi 4-8 32-41
lang: 0
sort: "{{ .Config.sort}}"
order: "{{ .Config.order}}"
sort: "{{ .Config.sort }}"
order: "{{ .Config.order }}"
keywordsfilters:
- name: re_replace
args: ["^$", "%"] # replace empty search string with %
Expand Down
8 changes: 4 additions & 4 deletions src/Jackett.Common/Definitions/32pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ search:
page: 4
inputs:
searchstr: "{{ .Keywords }}"
order_by: "{{ .Config.sort}}"
order_way: "{{ .Config.type}}"
order_by: "{{ .Config.sort }}"
order_way: "{{ .Config.type }}"
disablegrouping: 1

rows:
Expand All @@ -107,11 +107,11 @@ search:
selector: a[title="View Torrent"]
filters:
- name: prepend
args: "{{.Result._grouptitle}} - "
args: "{{ .Result._grouptitle }} - "
- name: replace
args: ["/ /","/"] #removes slash left after freeleech images
- name: append
args: "{{if .Result._language}} [{{.Result._language}}]{{else}}{{end}}"
args: "{{ if .Result._language }} [{{ .Result._language }}]{{ else }}{{ end }}"
category:
text: Comics
details:
Expand Down
6 changes: 3 additions & 3 deletions src/Jackett.Common/Definitions/3changtrai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@ search:
paths:
- path: torrents.php
inputs:
$raw: "{{ range .Categories }}cat{{.}}=1&{{end}}"
search: "{{ if .Query.IMDBID }}{{ .Query.IMDBID }}{{else}}{{ .Keywords }}{{end}}"
$raw: "{{ range .Categories }}cat{{ . }}=1&{{ end }}"
search: "{{ if .Query.IMDBID }}{{ .Query.IMDBID }}{{ else }}{{ .Keywords }}{{ end }}"
# 0 incldead 1 active 2 dead
incldead: 0
# 0 all 1 normal 2 free 3 2x 4 2xfree 5 50% 6 2x50% 7 30%
spstate: 0
# 0 title 1 descr 3 uploader 4 imdburl
search_area: "{{ if .Query.IMDBID }}4{{else}}0{{end}}"
search_area: "{{ if .Query.IMDBID }}4{{ else }}0{{ end }}"
# 0 AND 1 OR 2 exact
search_mode: 0
sort: "{{ .Config.sort }}"
Expand Down
2 changes: 1 addition & 1 deletion src/Jackett.Common/Definitions/3dtorrents.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ search:
paths:
- path: index.php
inputs:
$raw: "{{ range .Categories }}filter_cat[{{.}}]=1&{{end}}"
$raw: "{{ range .Categories }}filter_cat[{{ . }}]=1&{{ end }}"
search: "{{ .Keywords }}"
page: torrents
category: 0
Expand Down
4 changes: 2 additions & 2 deletions src/Jackett.Common/Definitions/3evils.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ search:
# https://www.3evils.com/browse.php?c3=1&c4=1&search=&searchin=title&incldead=1
- path: browse.php
inputs:
$raw: "{{range .Categories}}c{{.}}=1&{{end}}"
search: "{{.Keywords}}"
$raw: "{{ range .Categories }}c{{ . }}=1&{{ end }}"
search: "{{ .Keywords }}"
# title descr genre all
searchin: title
# 0 active 1 incldead 2 onlydead
Expand Down
2 changes: 1 addition & 1 deletion src/Jackett.Common/Definitions/4thd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ search:
- path: torrents.php
inputs:
# https://4thd.xyz/torrents.php?order_by=time&order_way=desc&filter_freeleech=1&title=twilight+zone&search_type=1&taglist=&tags_type=0
$raw: "{{ range .Categories }}filter_cat[{{.}}]=1&{{end}}"
$raw: "{{ range .Categories }}filter_cat[{{ . }}]=1&{{ end }}"
order_by: "{{ .Config.sort }}"
order_way: "{{ .Config.type }}"
# 0 all 1 onlyfree
Expand Down
6 changes: 3 additions & 3 deletions src/Jackett.Common/Definitions/52pt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,14 @@ search:
paths:
- path: torrents.php
inputs:
$raw: "{{ range .Categories }}cat{{.}}=1&{{end}}"
search: "{{ if .Query.IMDBID }}{{ .Query.IMDBID }}{{else}}{{ .Keywords }}{{end}}"
$raw: "{{ range .Categories }}cat{{ . }}=1&{{ end }}"
search: "{{ if .Query.IMDBID }}{{ .Query.IMDBID }}{{ else }}{{ .Keywords }}{{ end }}"
# 0 incldead 1 active 2 dead
incldead: 0
# 0 all 1 normal 2 free 3 2x 4 2xfree 5 50% 6 2x50% 7 30%
spstate: 0
# 0 title 1 descr 3 uploaded 4 imdburl
search_area: "{{ if .Query.IMDBID }}4{{else}}0{{end}}"
search_area: "{{ if .Query.IMDBID }}4{{ else }}0{{ end }}"
# 0 AND 1 OR 2 exact
search_mode: 0
sort: "{{ .Config.sort }}"
Expand Down
2 changes: 1 addition & 1 deletion src/Jackett.Common/Definitions/7torrents.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ search:
paths:
- path: search
inputs:
query: "{{ if .Keywords }}{{ .Keywords }}{{else}} {{end}}"
query: "{{ if .Keywords }}{{ .Keywords }}{{ else }} {{ end }}"
sort: "{{ .Config.sort }}"

rows:
Expand Down
6 changes: 3 additions & 3 deletions src/Jackett.Common/Definitions/Bittorrentfiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@ login:
search:
path: browse.php
inputs:
$raw: "{{ range .Categories }}c{{.}}=1&{{end}}"
search: "{{ if .Query.IMDBID }}{{ .Query.IMDBID }}{{else}}{{ .Keywords }}{{end}}"
$raw: "{{ range .Categories }}c{{ . }}=1&{{ end }}"
search: "{{ if .Query.IMDBID }}{{ .Query.IMDBID }}{{ else }}{{ .Keywords }}{{ end }}"
# 0=title 1=descr 2=nfo 3=all
search_where: "{{ if .Query.IMDBID }}3{{else}}0{{end}}"
search_where: "{{ if .Query.IMDBID }}3{{ else }}0{{ end }}"
# 0=active 1=all 2=dead 4=upload 5=doubleup 6=halfdown 7=highlight =request
status: 1
orderby: "{{ .Config.sort }}"
Expand Down
2 changes: 1 addition & 1 deletion src/Jackett.Common/Definitions/DasUnerwartete.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ login:
search:
path: browse.php
inputs:
$raw: "{{range .Categories}}c{{.}}=1&{{end}}"
$raw: "{{ range .Categories }}c{{ . }}=1&{{ end }}"
search: "{{ .Query.Keywords }}"
incldead: "1"

Expand Down
2 changes: 1 addition & 1 deletion src/Jackett.Common/Definitions/academictorrents.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ search:
inputs:
page: 1
inputs:
$raw: "{{ range .Categories }}c{{.}}=1&{{end}}"
$raw: "{{ range .Categories }}c{{ . }}=1&{{ end }}"
search: "{{ .Keywords }}"
sort_field: "{{ .Config.sort }}"
sort_dir: "{{ .Config.type }}"
Expand Down
2 changes: 1 addition & 1 deletion src/Jackett.Common/Definitions/acgsou.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ search:
paths:
# https://www.acgsou.com/1.html
# https://www.acgsou.com/search.php?keyword=test
- path: "{{ if .Keywords }}search.php?keyword={{ .Keywords }}{{else}}1.html{{end}}"
- path: "{{ if .Keywords }}search.php?keyword={{ .Keywords }}{{ else }}1.html{{ end }}"

rows:
selector: table tbody tr[class^="alt"]:has(td:nth-child(3) a)
Expand Down
2 changes: 1 addition & 1 deletion src/Jackett.Common/Definitions/acidlounge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ search:
paths:
- path: browse.php
inputs:
$raw: "{{range .Categories}}cid[]={{.}}&{{end}}"
$raw: "{{ range .Categories }}cid[]={{ . }}&{{ end }}"
search: "{{ .Keywords }}"
search_type: "title"
rows:
Expand Down
2 changes: 1 addition & 1 deletion src/Jackett.Common/Definitions/aftershock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ search:
paths:
- path: browse.php
inputs:
$raw: "{{ range .Categories }}c{{.}}=1&{{end}}"
$raw: "{{ range .Categories }}c{{ . }}=1&{{ end }}"
search: "{{ .Keywords }}"
incldead: 1
sort: "{{ .Config.sort }}"
Expand Down
10 changes: 5 additions & 5 deletions src/Jackett.Common/Definitions/amigosshare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ search:
inputs:
page: 4
inputs:
$raw: "{{ range .Categories }}c{{.}}=1&{{end}}"
$raw: "{{ range .Categories }}c{{ . }}=1&{{ end }}"
search: "{{ re_replace .Keywords \"[\\s]+\" \"%\" }}"
incldead: 1
freeleech: 0
Expand Down Expand Up @@ -184,16 +184,16 @@ search:
args: ["^(.*?)[\\(](.*?)[\\)](.*?)$", "$2$3"]
# add the year to the title
- name: append
args: "{{if .Result._year}} {{.Result._year}}{{else}}{{end}}"
args: "{{ if .Result._year }} {{ .Result._year }}{{ else }}{{ end }}"
# add the quality to the title
- name: append
args: "{{if .Result._quality}} {{.Result._quality}}{{else}}{{end}}"
args: "{{ if .Result._quality }} {{ .Result._quality }}{{ else }}{{ end }}"
# add the type to the title
- name: append
args: "{{if .Result._type}} {{.Result._type}}{{else}}{{end}}"
args: "{{ if .Result._type }} {{ .Result._type }}{{ else }}{{ end }}"
# add audio to the title
- name: append
args: "{{if .Result._language}} {{.Result._language}}{{else}}{{end}}"
args: "{{ if .Result._language }} {{ .Result._language }}{{ else }}{{ end }}"
- name: re_replace
args: ["(Dual-Audio|Dublado)", "Brazilian $1"]
details:
Expand Down
2 changes: 1 addition & 1 deletion src/Jackett.Common/Definitions/anirena.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ caps:

search:
paths:
- path: "{{if .Keywords}}?s={{ .Keywords}}{{else}}{{end}}"
- path: "{{ if .Keywords }}?s={{ .Keywords }}{{ else }}{{ end }}"

rows:
selector: table tbody tr:has(td.torrents_small_type_data1)
Expand Down
6 changes: 3 additions & 3 deletions src/Jackett.Common/Definitions/arabafenice.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ search:
- name: re_replace # S01E01 to 1 1
args: ["(?i)\\bS0*(\\d+)E0*(\\d+)\\b", "$1 $2"]
inputs:
search: "{{if .Query.IMDBID}}{{ .Query.IMDBIDShort }}{{else}}{{ .Keywords }}{{end}}"
search: "{{ if .Query.IMDBID }}{{ .Query.IMDBIDShort }}{{ else }}{{ .Keywords }}{{ end }}"
page: torrents
category: "{{ range .Categories }}{{.}};{{end}}"
options: "{{ if .Query.IMDBID }}4{{else}}0{{end}}"
category: "{{ range .Categories }}{{ . }};{{ end }}"
options: "{{ if .Query.IMDBID }}4{{ else }}0{{ end }}"
active: 0
order: "{{ .Config.sort }}"
by: "{{ .Config.type }}"
Expand Down
2 changes: 1 addition & 1 deletion src/Jackett.Common/Definitions/arabp2p.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ search:
inputs:
page: torrents
search: "{{ .Keywords }}"
category: "{{ if .Categories }}{{ range .Categories }}{{.}};{{end}}{{else}}0{{end}}"
category: "{{ if .Categories }}{{ range .Categories }}{{ . }};{{ end }}{{ else }}0{{ end }}"
# 0 all 1 activeonly 2 deadonly
active: 0
# 0 all 1 internal 2 external
Expand Down
2 changes: 1 addition & 1 deletion src/Jackett.Common/Definitions/arenabg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ search:
method: post
followredirect: true
inputs:
text: "{{ if .Keywords }}{{ .Keywords }}{{else}}{{end}}"
text: "{{ if .Keywords }}{{ .Keywords }}{{ else }}{{ end }}"
"text_mobile": ""
type: 0
audio: 0
Expand Down
6 changes: 3 additions & 3 deletions src/Jackett.Common/Definitions/asgaard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,17 +111,17 @@ search:
# https://asgrd.org/browse.php?sns=&sna=&spf=&sr=&sg=&sys=&sye=&srs=&sre=&si=tt2401090&ss=&incldead=0&only_free=0&sort=4&type=desc
- path: browse.php
inputs:
$raw: "{{ range .Categories }}cats[]={{.}}&{{end}}"
$raw: "{{ range .Categories }}cats[]={{ . }}&{{ end }}"
sns: ""
sna: "{{ if .Query.IMDBID }}{{else}}{{ .Keywords }}{{end}}"
sna: "{{ if .Query.IMDBID }}{{ else }}{{ .Keywords }}{{ end }}"
spf: ""
sr: ""
sg: ""
sys: ""
sye: ""
srs: ""
sre: ""
si: "{{ if .Query.IMDBID }}{{ .Query.IMDBID }}{{else}}{{end}}"
si: "{{ if .Query.IMDBID }}{{ .Query.IMDBID }}{{ else }}{{ end }}"
ss: ""
# 0 active 1 incldead 2 onlydead
incldead: 0
Expand Down
4 changes: 2 additions & 2 deletions src/Jackett.Common/Definitions/asiancinema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ search:
paths:
- path: torrents/filter
inputs:
$raw: "{{ range .Categories }}categories[]={{.}}&{{end}}"
search: "{{ if .Query.IMDBID }}{{else}}{{ .Keywords }}{{end}}"
$raw: "{{ range .Categories }}categories[]={{ . }}&{{ end }}"
search: "{{ if .Query.IMDBID }}{{ else }}{{ .Keywords }}{{ end }}"
description: ""
uploader: ""
imdb: "{{ .Query.IMDBIDShort }}"
Expand Down
2 changes: 1 addition & 1 deletion src/Jackett.Common/Definitions/ast4u.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ search:
paths:
- path: browse.php
inputs:
$raw: "{{range .Categories}}c{{.}}=1&{{end}}"
$raw: "{{ range .Categories }}c{{ . }}=1&{{ end }}"
search: "{{ .Query.Keywords }}"
incldead: "0"
orderby: "added"
Expand Down
10 changes: 5 additions & 5 deletions src/Jackett.Common/Definitions/audiobookbay.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ search:
# with just 7 results per page, try to grab up to 35 results
# http://audiobookbay.nl/?s=teeth
# http://audiobookbay.nl/page/2/?s=teeth
- path: "{{ if .Keywords }}/?s={{ .Keywords }}{{else}}/{{end}}"
- path: "{{ if .Keywords }}/page/2/?s={{ .Keywords }}{{else}}{{end}}"
- path: "{{ if .Keywords }}/page/3/?s={{ .Keywords }}{{else}}{{end}}"
- path: "{{ if .Keywords }}/page/4/?s={{ .Keywords }}{{else}}{{end}}"
- path: "{{ if .Keywords }}/page/5/?s={{ .Keywords }}{{else}}{{end}}"
- path: "{{ if .Keywords }}/?s={{ .Keywords }}{{ else }}/{{ end }}"
- path: "{{ if .Keywords }}/page/2/?s={{ .Keywords }}{{ else }}{{ end }}"
- path: "{{ if .Keywords }}/page/3/?s={{ .Keywords }}{{ else }}{{ end }}"
- path: "{{ if .Keywords }}/page/4/?s={{ .Keywords }}{{ else }}{{ end }}"
- path: "{{ if .Keywords }}/page/5/?s={{ .Keywords }}{{ else }}{{ end }}"

rows:
selector: div.post:has(div[class="postTitle"])
Expand Down
2 changes: 1 addition & 1 deletion src/Jackett.Common/Definitions/audiobooktorrents.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ search:
paths:
- path: browse.php
inputs:
$raw: "{{range .Categories}}c{{.}}=1&{{end}}"
$raw: "{{ range .Categories }}c{{ . }}=1&{{ end }}"
search: "{{ .Keywords }}"
searchin: title
incldead: 1
Expand Down
2 changes: 1 addition & 1 deletion src/Jackett.Common/Definitions/audionews.yml
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ search:
- path: tracker.php
method: post
inputs:
$raw: "{{ if .Categories }}{{ range .Categories }}f[]={{.}}&{{end}}{{else}}f[]=-1{{end}}"
$raw: "{{ if .Categories }}{{ range .Categories }}f[]={{ . }}&{{ end }}{{ else }}f[]=-1{{ end }}"
prev_allw: 1
prev_a: 0
prev_dla: 0
Expand Down
2 changes: 1 addition & 1 deletion src/Jackett.Common/Definitions/baibako.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ search:
paths:
- path: browse.php
inputs:
search: "{{.Keywords }}"
search: "{{ .Keywords }}"
# 0 active 1 incldead 2 onlydead 3 gold 4 seedfree
incldead: 1
sort: "{{ .Config.sort }}"
Expand Down
6 changes: 3 additions & 3 deletions src/Jackett.Common/Definitions/beitai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ search:
paths:
- path: torrents.php
inputs:
$raw: "{{ range .Categories }}cat{{.}}=1&{{end}}"
search: "{{ if .Query.IMDBID }}{{ .Query.IMDBID }}{{else}}{{ .Keywords }}{{end}}"
$raw: "{{ range .Categories }}cat{{ . }}=1&{{ end }}"
search: "{{ if .Query.IMDBID }}{{ .Query.IMDBID }}{{ else }}{{ .Keywords }}{{ end }}"
# 0 incldead 1 active 2 dead
incldead: 0
# 0 all 1 normal 2 free 3 2x 4 2xfree 5 50% 6 2x50% 7 30%
spstate: 0
# 0 title 1 descr 3 uploaded 4 imdburl (searching imdburl does not work with tt1234567, but descr is good)
search_area: "{{ if .Query.IMDBID }}1{{else}}0{{end}}"
search_area: "{{ if .Query.IMDBID }}1{{ else }}0{{ end }}"
# 0 AND 1 OR 2 exact
search_mode: 0
sort: "{{ .Config.sort }}"
Expand Down