assorted: conform to yaml standards by avoiding duplicate keys #11917

This commit is contained in:
Garfield69 2021-10-20 15:07:43 +13:00
parent 01094a6312
commit 8b2233095d
2 changed files with 16 additions and 8 deletions

View File

@ -111,19 +111,21 @@ search:
filters:
- name: querystring
args: cat
title:
title_default:
selector: a[href^="details.php?id="]
title:
title_optional:
optional: true
selector: a[title][href^="details.php?id="]
attribute: title
title:
text: "{{ if .Result.title_optional }}{{ .Result.title_optional }}{{ else }}{{ .Result.title_default }}{{ end }}"
details:
selector: a[href^="details.php?id="]
attribute: href
download:
selector: a[href^="download.php?id="]
attribute: href
date:
date_elapsed:
# time type: time elapsed (default)
selector: td:nth-child(4) > span[title]
attribute: title
@ -133,7 +135,7 @@ search:
args: " +07:00" # ICT
- name: dateparse
args: "2006-01-02 15:04:05 -07:00"
date:
date_added:
# time added
selector: td:nth-child(4):not(:has(span))
optional: true
@ -142,6 +144,8 @@ search:
args: " +07:00" # ICT
- name: dateparse
args: "2006-01-0215:04:05 -07:00"
date:
text: "{{ if or .Result.date_elapsed .Result.date_added }}{{ or .Result.date_elapsed .Result.date_added }}{{ else }}now{{ end }}"
size:
selector: td:nth-child(5)
seeders:

View File

@ -93,12 +93,14 @@ search:
selector: table.torrents > tbody > tr:has(table.torrentname)
fields:
title:
title_default:
selector: a[href^="details.php?id="]
title:
title_optional:
optional: true
selector: a[title][href^="details.php?id="]
attribute: title
title:
text: "{{ if .Result.title_optional }}{{ .Result.title_optional }}{{ else }}{{ .Result.title_default }}{{ end }}"
category:
selector: a[href^="?cat="]
attribute: href
@ -114,7 +116,7 @@ search:
imdb:
selector: div.imdb_100 > a
attribute: href
date:
date_elapsed:
# time type: time elapsed (default)
selector: td:nth-child(4) > span[title]
attribute: title
@ -124,7 +126,7 @@ search:
args: " +08:00" # CST
- name: dateparse
args: "2006-01-02 15:04:05 -07:00"
date:
date_added:
# time added
selector: td:nth-child(4):not(:has(span))
optional: true
@ -133,6 +135,8 @@ search:
args: " +08:00" # CST
- name: dateparse
args: "2006-01-0215:04:05 -07:00"
date:
text: "{{ if or .Result.date_elapsed .Result.date_added }}{{ or .Result.date_elapsed .Result.date_added }}{{ else }}now{{ end }}"
size:
selector: td:nth-child(5)
seeders: