Cardigann: disable the ignore unmatched properties.

and fix any yaml indexers that fail the syntax checking.

the option to ignoreUnmatchedProperties was enabled for #1549 and should have been turned off again once that task was completed.

leaving it enabled caused several unexplained behaviours in indexers where some statements were ignore by cardigann despite the intentions of the writer, and were not picked up during testing.
This commit is contained in:
Garfield69
2020-04-13 09:45:57 +12:00
parent 5d47cf060a
commit b5f5e7d619
14 changed files with 55 additions and 53 deletions

View File

@@ -10,29 +10,29 @@
caps: caps:
categorymappings: categorymappings:
- {id: 38, cat: Movies, "Movie Pack"} - {id: 38, cat: Movies, desc: "Movie Pack"}
- {id: 36, cat: Movies, "Movies/Classic Films"} - {id: 36, cat: Movies, desc: "Movies/Classic Films"}
- {id: 13, cat: Movies, "Movies/Documentary"} - {id: 13, cat: Movies, desc: "Movies/Documentary"}
- {id: 21, cat: Movies/Foreign, "Movies/Foreign"} - {id: 21, cat: Movies/Foreign, desc: "Movies/Foreign"}
- {id: 27, cat: Movies/HD, "MoviesHD"} - {id: 27, cat: Movies/HD, desc: "MoviesHD"}
- {id: 29, cat: Movies/SD, "Movies/SD"} - {id: 29, cat: Movies/SD, desc: "Movies/SD"}
- {id: 26, cat: Movies/SD, "Movies/XviD"} - {id: 26, cat: Movies/SD, desc: "Movies/XviD"}
- {id: 41, cat: TV/FOREIGN, "Foreign tv"} - {id: 41, cat: TV/FOREIGN, desc: "Foreign tv"}
- {id: 40, cat: TV, "Mini-Series"} - {id: 40, cat: TV, desc: "Mini-Series"}
- {id: 43, cat: TV/HD, "TV H265"} - {id: 43, cat: TV/HD, desc: "TV H265"}
- {id: 42, cat: TV, "TV Movie"} - {id: 42, cat: TV, desc: "TV Movie"}
- {id: 4, cat: TV/HD, "TV/HD-x720"} - {id: 4, cat: TV/HD, desc: "TV/HD-x720"}
- {id: 14, cat: TV, "TV/Packs"} - {id: 14, cat: TV, desc: "TV/Packs"}
- {id: 2, cat: TV/SD, "TV/SD MP4/mkv"} - {id: 2, cat: TV/SD, desc: "TV/SD MP4/mkv"}
- {id: 31, cat: TV/SD, "TV/XviD"} - {id: 31, cat: TV/SD, desc: "TV/XviD"}
- {id: 18, cat: PC/Games, "Games/PC"} - {id: 18, cat: PC/Games, desc: "Games/PC"}
- {id: 44, cat: Audio, "Music/Pack"} - {id: 44, cat: Audio, desc: "Music/Pack"}
- {id: 12, cat: Audio/Lossless, "Music/FLAC"} - {id: 12, cat: Audio/Lossless, desc: "Music/FLAC"}
- {id: 15, cat: Audio/MP3, "Music/MP3"} - {id: 15, cat: Audio/MP3, desc: "Music/MP3"}
- {id: 37, cat: Audio, "Radio"} - {id: 37, cat: Audio, desc: "Radio"}
- {id: 9, cat: PC/0day, "Apps/PC"} - {id: 9, cat: PC/0day, desc: "Apps/PC"}
- {id: 34, cat: Audio/Audiobook, "Audiobooks"} - {id: 34, cat: Audio/Audiobook, desc: "Audiobooks"}
- {id: 25, cat: Books/Ebook, "eBooks"} - {id: 25, cat: Books/Ebook, desc: "eBooks"}
modes: modes:
search: [q] search: [q]

View File

@@ -45,7 +45,6 @@
search: search:
paths: paths:
- path: torrents.php - path: torrents.php
method: post
inputs: inputs:
$raw: "{{range .Categories}}cat{{.}}=1&{{end}}" $raw: "{{range .Categories}}cat{{.}}=1&{{end}}"
search: "{{ .Query.Keywords }}" search: "{{ .Query.Keywords }}"
@@ -67,7 +66,7 @@
args: cat args: cat
details: details:
selector: a[href^="details.php?id="] selector: a[href^="details.php?id="]
attribute: href attribute: href
download: download:
selector: a[href^="download.php?id="] selector: a[href^="download.php?id="]
attribute: href attribute: href

View File

@@ -61,7 +61,7 @@
username: "{{ .Config.username }}" username: "{{ .Config.username }}"
password: "{{ .Config.password }}" password: "{{ .Config.password }}"
keeplogged: 1 keeplogged: 1
test: test:
path: my.php path: my.php
search: search:

View File

@@ -176,7 +176,7 @@
selector: form[action="index.php?page=login&returnto=index.php"] table tr:nth-of-type(2) td span selector: form[action="index.php?page=login&returnto=index.php"] table tr:nth-of-type(2) td span
test: test:
path: tracker/index.php path: tracker/index.php
select: a[href="logout.php"] selector: a[href="logout.php"]
download: download:
before: before:

View File

@@ -81,7 +81,6 @@
search: search:
paths: paths:
- path: torrents.php - path: torrents.php
method: post
inputs: inputs:
$raw: "{{ range .Categories }}cat{{.}}=1&{{end}}" $raw: "{{ range .Categories }}cat{{.}}=1&{{end}}"
search: "{{ if .Query.IMDBID }}{{ .Query.IMDBID }}{{else}}{{ .Keywords }}{{end}}" search: "{{ if .Query.IMDBID }}{{ .Query.IMDBID }}{{else}}{{ .Keywords }}{{end}}"

View File

@@ -266,7 +266,7 @@
- {id: 559, cat: Audio/MP3, desc: "Музыка - Сборники отечественного шансона (Lossy)"} - {id: 559, cat: Audio/MP3, desc: "Музыка - Сборники отечественного шансона (Lossy)"}
- {id: 555, cat: Audio/Lossless, desc: "Музыка - Саундтреки к зарубежным фильмам (Lossless)"} - {id: 555, cat: Audio/Lossless, desc: "Музыка - Саундтреки к зарубежным фильмам (Lossless)"}
- {id: 560, cat: Audio/Lossless, desc: "Музыка - Зарубежная музыка других жанров (Lossless)"} - {id: 560, cat: Audio/Lossless, desc: "Музыка - Зарубежная музыка других жанров (Lossless)"}
- {id: 561, cat: Audio,/MP3 desc: "Музыка - Зарубежная музыка других жанров (Lossy)"} - {id: 561, cat: Audio/MP3, desc: "Музыка - Зарубежная музыка других жанров (Lossy)"}
- {id: 562, cat: Audio/MP3, desc: "Музыка - Сборники песен для детей (Lossy)"} - {id: 562, cat: Audio/MP3, desc: "Музыка - Сборники песен для детей (Lossy)"}
- {id: 564, cat: Audio/Lossless, desc: "Музыка - Военная песня (Lossless)"} - {id: 564, cat: Audio/Lossless, desc: "Музыка - Военная песня (Lossless)"}
- {id: 565, cat: Audio/Lossless, desc: "Музыка - Авторская песня (Lossless)"} - {id: 565, cat: Audio/Lossless, desc: "Музыка - Авторская песня (Lossless)"}

View File

@@ -72,15 +72,15 @@
search: search:
paths: paths:
- path: letoltes.php - path: letoltes.php
categorymappings: ["!", 70, 39, 57] categories: ["!", 70, 39, 57]
inputs: inputs:
tipus: 1 tipus: 1
- path: letoltes.php - path: letoltes.php
categorymappings: ["!", 70, 39, 57] categories: ["!", 70, 39, 57]
inputs: inputs:
tipus: 2 tipus: 2
- path: xxx.php - path: xxx.php
categorymappings: [70, 39, 57] categories: [70, 39, 57]
inputs: inputs:
$raw: "{{ range .Categories }}category[]={{.}}&{{end}}" $raw: "{{ range .Categories }}category[]={{.}}&{{end}}"
name: "{{ if .Query.IMDBID }}http://www.imdb.com/title/{{ .Query.IMDBID }}{{else}}{{ .Keywords }}{{end}}" name: "{{ if .Query.IMDBID }}http://www.imdb.com/title/{{ .Query.IMDBID }}{{else}}{{ .Keywords }}{{end}}"

View File

@@ -104,11 +104,11 @@
search: search:
paths: paths:
- path: torrents.php - path: torrents.php
categorymappings: ["!", 410, 429, 424, 430, 426, 437, 431, 432, 436, 425, 433, 411, 412, 413, 406, 408, 434] categories: ["!", 410, 429, 424, 430, 426, 437, 431, 432, 436, 425, 433, 411, 412, 413, 406, 408, 434]
- path: adult.php - path: adult.php
categorymappings: [410, 429, 424, 430, 426, 437, 431, 432, 436, 425, 433, 411, 412, 413] categories: [410, 429, 424, 430, 426, 437, 431, 432, 436, 425, 433, 411, 412, 413]
- path: music.php - path: music.php
categorymappings: [406, 408, 434] categories: [406, 408, 434]
inputs: inputs:
$raw: "{{ range .Categories }}cat{{.}}=1&{{end}}" $raw: "{{ range .Categories }}cat{{.}}=1&{{end}}"
search: "{{ if .Query.IMDBID }}{{ .Query.IMDBID }}{{else}}{{ .Keywords }}{{end}}" search: "{{ if .Query.IMDBID }}{{ .Query.IMDBID }}{{else}}{{ .Keywords }}{{end}}"

View File

@@ -99,11 +99,11 @@
search: search:
paths: paths:
- path: torrents.php - path: torrents.php
categorymappings: ["!", 410, 429, 424, 430, 426, 437, 431, 432, 436, 425, 433, 411, 412, 413, 406, 408, 434] categories: ["!", 410, 429, 424, 430, 426, 437, 431, 432, 436, 425, 433, 411, 412, 413, 406, 408, 434]
- path: adult.php - path: adult.php
categorymappings: [410, 429, 424, 430, 426, 437, 431, 432, 436, 425, 433, 411, 412, 413] categories: [410, 429, 424, 430, 426, 437, 431, 432, 436, 425, 433, 411, 412, 413]
- path: music.php - path: music.php
categorymappings: [406, 408, 434] categories: [406, 408, 434]
inputs: inputs:
$raw: "{{range .Categories}}cat{{.}}=1&{{end}}" $raw: "{{range .Categories}}cat{{.}}=1&{{end}}"
search: "{{if .Query.IMDBID}}{{ .Query.IMDBID }}{{else}}{{ .Keywords }}{{end}}" search: "{{if .Query.IMDBID}}{{ .Query.IMDBID }}{{else}}{{ .Keywords }}{{end}}"

View File

@@ -46,14 +46,16 @@
search: search:
paths: paths:
- path: browse.php - path: browse.php
method: post method: post
inputs: inputs:
$raw: "{{range .Categories}}c{{.}}=1&{{end}}" $raw: "{{ range .Categories }}c{{.}}=1&{{end}}"
search: "{{ .Query.Keywords }}" search: "{{ .Keywords }}"
incldead: "1" incldead: 1
descriptions: "0" descriptions: 0
rows: rows:
selector: table#torrent-list > tbody > tr[id] selector: table#torrent-list > tbody > tr[id]
fields: fields:
title: title:
selector: td:nth-child(3) > b > a selector: td:nth-child(3) > b > a
@@ -75,7 +77,7 @@
selector: td:nth-child(7) selector: td:nth-child(7)
filters: filters:
- name: regexp - name: regexp
args: "(\\d+)" args: (\d+)
seeders: seeders:
selector: td:nth-child(8) selector: td:nth-child(8)
leechers: leechers:
@@ -90,8 +92,8 @@
attribute: href attribute: href
downloadvolumefactor: downloadvolumefactor:
case: case:
"a[style=\"color:#000099\"][href^=\"details.php?\"]": "0" "a[style=\"color:#000099\"][href^=\"details.php?\"]": 0
"*": "1" "*": 1
uploadvolumefactor: uploadvolumefactor:
case: text: 1
"*": "1" # engine tbd

View File

@@ -112,9 +112,9 @@
search: search:
paths: paths:
- path: viewno18.php - path: viewno18.php
categorymappings: ["!", 901, 902, 903, 904, 905, 906, 907, 908, 910, 911, 912] categories: ["!", 901, 902, 903, 904, 905, 906, 907, 908, 910, 911, 912]
- path: viewbr.php - path: viewbr.php
categorymappings: [901, 902, 903, 904, 905, 906, 907, 908, 910, 911, 912] categories: [901, 902, 903, 904, 905, 906, 907, 908, 910, 911, 912]
inputs: inputs:
$raw: "{{ range .Categories }}c{{.}}=1&{{end}}" $raw: "{{ range .Categories }}c{{.}}=1&{{end}}"
search: "{{ .Keywords }}" search: "{{ .Keywords }}"

View File

@@ -183,7 +183,6 @@
user-agent: "[ .Config.useragent ]" user-agent: "[ .Config.useragent ]"
search: search:
followredirect: true
keywordsfilters: keywordsfilters:
# Hack For anime Search ! example : replace sonarr search of # Hack For anime Search ! example : replace sonarr search of
# One Punch Man S2 10 OR One Punch Man S2 2 # One Punch Man S2 10 OR One Punch Man S2 2
@@ -207,7 +206,9 @@
- name: trim - name: trim
paths: paths:
- path: "https://{{ .Config.searchanddlurl }}/{{ if .Config.betasearchengine }}new_search{{else}}engine{{end}}/search?category={{ .Config.category }}&name={{ if .Config.betasearchengine }}{{ .Keywords }}{{else}}{{ re_replace .Keywords \"\\b[^\\s]+\\b\" \"\"$&\"\"}}{{end}}&description=&file=&uploader=&sub_category=&do=search&order={{ .Config.type }}&sort={{ .Config.sort }}" - path: "https://{{ .Config.searchanddlurl }}/{{ if .Config.betasearchengine }}new_search{{else}}engine{{end}}/search?category={{ .Config.category }}&name={{ if .Config.betasearchengine }}{{ .Keywords }}{{else}}{{ re_replace .Keywords \"\\b[^\\s]+\\b\" \"\"$&\"\"}}{{end}}&description=&file=&uploader=&sub_category=&do=search&order={{ .Config.type }}&sort={{ .Config.sort }}"
followredirect: true
- path: "https://{{ .Config.searchanddlurl }}/{{ if .Config.betasearchengine }}new_search{{else}}engine{{end}}/search?category={{ .Config.category }}&name={{ if .Config.betasearchengine }}{{ .Keywords }}{{else}}{{ re_replace .Keywords \"\\b[^\\s]+\\b\" \"\"$&\"\"}}{{end}}&description=&file=&uploader=&sub_category=&do=search&order={{ .Config.type }}&sort={{ .Config.sort }}&page=50" - path: "https://{{ .Config.searchanddlurl }}/{{ if .Config.betasearchengine }}new_search{{else}}engine{{end}}/search?category={{ .Config.category }}&name={{ if .Config.betasearchengine }}{{ .Keywords }}{{else}}{{ re_replace .Keywords \"\\b[^\\s]+\\b\" \"\"$&\"\"}}{{end}}&description=&file=&uploader=&sub_category=&do=search&order={{ .Config.type }}&sort={{ .Config.sort }}&page=50"
followredirect: true
rows: rows:
selector: table.table > tbody > tr selector: table.table > tbody > tr

View File

@@ -191,7 +191,6 @@
selector: div#top_panel:contains("Déconnexion") selector: div#top_panel:contains("Déconnexion")
search: search:
followredirect: true
keywordsfilters: keywordsfilters:
# Hack For anime Search ! example : replace sonarr search of # Hack For anime Search ! example : replace sonarr search of
# One Punch Man S2 10 OR One Punch Man S2 2 # One Punch Man S2 10 OR One Punch Man S2 2
@@ -215,7 +214,9 @@
- name: trim - name: trim
paths: paths:
- path: "https://{{ .Config.searchanddlurl }}/{{ if .Config.betasearchengine }}new_search{{else}}engine{{end}}/search?category={{ .Config.category }}&name={{ if .Config.betasearchengine }}{{ .Keywords }}{{else}}{{ re_replace .Keywords \"\\b[^\\s]+\\b\" \"\"$&\"\"}}{{end}}&description=&file=&uploader=&sub_category=&do=search&order={{ .Config.type }}&sort={{ .Config.sort }}" - path: "https://{{ .Config.searchanddlurl }}/{{ if .Config.betasearchengine }}new_search{{else}}engine{{end}}/search?category={{ .Config.category }}&name={{ if .Config.betasearchengine }}{{ .Keywords }}{{else}}{{ re_replace .Keywords \"\\b[^\\s]+\\b\" \"\"$&\"\"}}{{end}}&description=&file=&uploader=&sub_category=&do=search&order={{ .Config.type }}&sort={{ .Config.sort }}"
followredirect: true
- path: "https://{{ .Config.searchanddlurl }}/{{ if .Config.betasearchengine }}new_search{{else}}engine{{end}}/search?category={{ .Config.category }}&name={{ if .Config.betasearchengine }}{{ .Keywords }}{{else}}{{ re_replace .Keywords \"\\b[^\\s]+\\b\" \"\"$&\"\"}}{{end}}&description=&file=&uploader=&sub_category=&do=search&order={{ .Config.type }}&sort={{ .Config.sort }}&page=50" - path: "https://{{ .Config.searchanddlurl }}/{{ if .Config.betasearchengine }}new_search{{else}}engine{{end}}/search?category={{ .Config.category }}&name={{ if .Config.betasearchengine }}{{ .Keywords }}{{else}}{{ re_replace .Keywords \"\\b[^\\s]+\\b\" \"\"$&\"\"}}{{end}}&description=&file=&uploader=&sub_category=&do=search&order={{ .Config.type }}&sort={{ .Config.sort }}&page=50"
followredirect: true
rows: rows:
selector: table.table > tbody > tr selector: table.table > tbody > tr

View File

@@ -93,7 +93,7 @@ namespace Jackett.Common.Services
var deserializer = new DeserializerBuilder() var deserializer = new DeserializerBuilder()
.WithNamingConvention(CamelCaseNamingConvention.Instance) .WithNamingConvention(CamelCaseNamingConvention.Instance)
.IgnoreUnmatchedProperties() // .IgnoreUnmatchedProperties()
.Build(); .Build();
try try