mirror of https://github.com/Jackett/Jackett
assorted: simplify use of sitelink for results fields (#14832)
This commit is contained in:
parent
667fdd1353
commit
7fbb6efa87
|
@ -89,11 +89,10 @@ search:
|
|||
selector: ..code
|
||||
details:
|
||||
text: "{{ .Config.sitelink }}release/{{ .Result._code }}.html"
|
||||
download:
|
||||
download_url:
|
||||
selector: url
|
||||
filters:
|
||||
- name: prepend
|
||||
args: "{{ .Config.sitelink }}"
|
||||
download:
|
||||
text: "{{ .Config.sitelink }}{{ .Result.download_url }}"
|
||||
magnet:
|
||||
selector: magnet
|
||||
poster:
|
||||
|
|
|
@ -41,7 +41,7 @@ search:
|
|||
title:
|
||||
selector: div.flex.flex-wrap ~ p
|
||||
details:
|
||||
text: "{{ .Config.sitelink }}search?query={{ .Result.title }}"
|
||||
text: /
|
||||
download:
|
||||
selector: a[href*="/download/"]
|
||||
attribute: href
|
||||
|
|
|
@ -50,7 +50,7 @@ search:
|
|||
title:
|
||||
selector: title
|
||||
details:
|
||||
text: "{{ .Config.sitelink }}"
|
||||
text: /
|
||||
infohash:
|
||||
selector: infoHash
|
||||
poster:
|
||||
|
|
|
@ -107,9 +107,9 @@ search:
|
|||
title:
|
||||
selector: name
|
||||
details:
|
||||
text: "{{ .Config.sitelink }}torrents/{{ .Result._id }}"
|
||||
text: "/torrents/{{ .Result._id }}"
|
||||
download:
|
||||
text: "{{ .Config.sitelink }}torrent/download/{{ .Result._id }}.{{ .Config.rsskey }}"
|
||||
text: "/torrent/download/{{ .Result._id }}.{{ .Config.rsskey }}"
|
||||
infohash:
|
||||
selector: info_hash
|
||||
poster:
|
||||
|
|
|
@ -137,9 +137,9 @@ search:
|
|||
_id:
|
||||
selector: id
|
||||
details:
|
||||
text: "{{ .Config.sitelink }}torrent/{{ .Result._id }}/"
|
||||
text: "/torrent/{{ .Result._id }}/"
|
||||
download:
|
||||
text: "{{ .Config.sitelink }}api/v1/torrents/download/{{ .Result._id }}"
|
||||
text: "/api/v1/torrents/download/{{ .Result._id }}"
|
||||
imdbid:
|
||||
selector: imdbid2
|
||||
imdbid_full:
|
||||
|
@ -150,7 +150,7 @@ search:
|
|||
selector: firstpic
|
||||
poster_imdb:
|
||||
optional: true
|
||||
text: "{{ if .Result.imdbid }}{{ .Config.sitelink }}img/imdb/{{ .Result.imdbid_full }}.jpg{{ else }}{{ end }}"
|
||||
text: "{{ if .Result.imdbid }}/img/imdb/{{ .Result.imdbid_full }}.jpg{{ else }}{{ end }}"
|
||||
poster:
|
||||
text: "{{ if .Result.poster_imdb }}{{ .Result.poster_imdb }}{{ else }}{{ .Result.poster_normal }}{{ end }}"
|
||||
date:
|
||||
|
|
|
@ -112,9 +112,9 @@ search:
|
|||
title:
|
||||
text: "{{ if .Result.title_notenglish }}{{ .Result.title_notenglish }}{{ else }}{{ .Result.title_english }}{{ end }}"
|
||||
details:
|
||||
text: "{{ .Config.sitelink }}torrents.php?torrentid={{ .Result._id }}"
|
||||
text: "/torrents.php?torrentid={{ .Result._id }}"
|
||||
download:
|
||||
text: "{{ .Config.sitelink }}torrents.php?action=download&id={{ .Result._id }}"
|
||||
text: "/torrents.php?action=download&id={{ .Result._id }}"
|
||||
poster:
|
||||
selector: ..cover
|
||||
imdbid:
|
||||
|
|
|
@ -61,13 +61,13 @@ search:
|
|||
title:
|
||||
selector: releaseName
|
||||
details:
|
||||
text: "{{ .Config.sitelink }}browse/{{ .Result._id }}"
|
||||
text: "/browse/{{ .Result._id }}"
|
||||
_apikey:
|
||||
text: "{{ .Config.apikey }}"
|
||||
filters:
|
||||
- name: urlencode
|
||||
download:
|
||||
text: "{{ .Config.sitelink }}api/v1/torrents/{{ .Result._id }}/torrent?key={{ .Result._apikey }}"
|
||||
text: "/api/v1/torrents/{{ .Result._id }}/torrent?key={{ .Result._apikey }}"
|
||||
date:
|
||||
selector: createdAt
|
||||
size:
|
||||
|
|
|
@ -38,7 +38,7 @@ search:
|
|||
- name: replace
|
||||
args: ["[Nipponsei] ", ""]
|
||||
details:
|
||||
text: "{{ .Config.sitelink }}"
|
||||
text: /
|
||||
download:
|
||||
selector: a
|
||||
attribute: href
|
||||
|
|
|
@ -40,7 +40,7 @@ search:
|
|||
title:
|
||||
selector: raw_title
|
||||
details:
|
||||
text: "{{ .Config.sitelink }}"
|
||||
text: /
|
||||
date:
|
||||
selector: pubDate
|
||||
download:
|
||||
|
|
|
@ -127,9 +127,9 @@ search:
|
|||
_id:
|
||||
selector: id
|
||||
details:
|
||||
text: "{{ .Config.sitelink }}torrent/{{ .Result._id }}/"
|
||||
text: "/torrent/{{ .Result._id }}/"
|
||||
download:
|
||||
text: "{{ .Config.sitelink }}api/v1/torrents/download/{{ .Result._id }}"
|
||||
text: "/api/v1/torrents/download/{{ .Result._id }}"
|
||||
imdbid:
|
||||
selector: imdbid2
|
||||
imdbid_full:
|
||||
|
@ -140,7 +140,7 @@ search:
|
|||
selector: customcover
|
||||
poster_imdb:
|
||||
optional: true
|
||||
text: "{{ if .Result.imdbid }}{{ .Config.sitelink }}img/imdb/{{ .Result.imdbid_full }}.jpg{{ else }}{{ end }}"
|
||||
text: "{{ if .Result.imdbid }}/img/imdb/{{ .Result.imdbid_full }}.jpg{{ else }}{{ end }}"
|
||||
poster:
|
||||
text: "{{ if .Result.poster_imdb }}{{ .Result.poster_imdb }}{{ else }}{{ .Result.poster_normal }}{{ end }}"
|
||||
date:
|
||||
|
|
|
@ -174,9 +174,9 @@ search:
|
|||
_filename:
|
||||
selector: filename
|
||||
details:
|
||||
text: "{{ .Config.sitelink }}torrent/{{ .Result._id }}"
|
||||
text: "/torrent/{{ .Result._id }}"
|
||||
download:
|
||||
text: "{{ .Config.sitelink }}download/{{ .Result._id }}/{{ .Result._filename }}"
|
||||
text: "/download/{{ .Result._id }}/{{ .Result._filename }}"
|
||||
genre:
|
||||
selector: tags
|
||||
filters:
|
||||
|
|
|
@ -137,7 +137,7 @@ search:
|
|||
- name: regexp
|
||||
args: (\d+)
|
||||
download:
|
||||
text: "{{ .Config.sitelink }}download/{{ .Result._id }}/"
|
||||
text: "/download/{{ .Result._id }}/"
|
||||
title_hungarian:
|
||||
selector: a[href^="/details/"]
|
||||
attribute: title
|
||||
|
|
|
@ -94,8 +94,7 @@ search:
|
|||
# some tv have category as video() which can also be movies, so we look for the SxxExx to tag TV
|
||||
text: "{{ if .Result.category_is_tv_show }}Video(TV shows){{ else }}{{ .Result.category_provided }}{{ end }}"
|
||||
details:
|
||||
# there is no details page so we use the sitelink
|
||||
text: "{{ .Config.sitelink }}"
|
||||
text: /
|
||||
download:
|
||||
selector: a[href^="magnet:?"]
|
||||
attribute: href
|
||||
|
|
|
@ -437,7 +437,7 @@ search:
|
|||
category:
|
||||
selector: td:nth-child(1) > div.hidden
|
||||
download:
|
||||
text: "{{ .Config.sitelink }}engine/download_torrent?id={{ .Result._id }}"
|
||||
text: "/engine/download_torrent?id={{ .Result._id }}"
|
||||
date:
|
||||
# unix
|
||||
selector: td:nth-child(5) > div.hidden
|
||||
|
|
|
@ -441,7 +441,7 @@ search:
|
|||
category:
|
||||
selector: td:nth-child(1) > div.hidden
|
||||
download:
|
||||
text: "{{ .Config.sitelink }}engine/download_torrent?id={{ .Result._id }}"
|
||||
text: "/engine/download_torrent?id={{ .Result._id }}"
|
||||
date:
|
||||
# unix
|
||||
selector: td:nth-child(5) > div.hidden
|
||||
|
|
Loading…
Reference in New Issue