assorted: simplify use of sitelink for results fields (#14832)

This commit is contained in:
ilike2burnthing
2023-11-08 02:29:30 +00:00
committed by GitHub
parent 667fdd1353
commit 7fbb6efa87
15 changed files with 25 additions and 27 deletions

View File

@@ -89,11 +89,10 @@ search:
selector: ..code selector: ..code
details: details:
text: "{{ .Config.sitelink }}release/{{ .Result._code }}.html" text: "{{ .Config.sitelink }}release/{{ .Result._code }}.html"
download: download_url:
selector: url selector: url
filters: download:
- name: prepend text: "{{ .Config.sitelink }}{{ .Result.download_url }}"
args: "{{ .Config.sitelink }}"
magnet: magnet:
selector: magnet selector: magnet
poster: poster:

View File

@@ -41,7 +41,7 @@ search:
title: title:
selector: div.flex.flex-wrap ~ p selector: div.flex.flex-wrap ~ p
details: details:
text: "{{ .Config.sitelink }}search?query={{ .Result.title }}" text: /
download: download:
selector: a[href*="/download/"] selector: a[href*="/download/"]
attribute: href attribute: href

View File

@@ -50,7 +50,7 @@ search:
title: title:
selector: title selector: title
details: details:
text: "{{ .Config.sitelink }}" text: /
infohash: infohash:
selector: infoHash selector: infoHash
poster: poster:

View File

@@ -107,9 +107,9 @@ search:
title: title:
selector: name selector: name
details: details:
text: "{{ .Config.sitelink }}torrents/{{ .Result._id }}" text: "/torrents/{{ .Result._id }}"
download: download:
text: "{{ .Config.sitelink }}torrent/download/{{ .Result._id }}.{{ .Config.rsskey }}" text: "/torrent/download/{{ .Result._id }}.{{ .Config.rsskey }}"
infohash: infohash:
selector: info_hash selector: info_hash
poster: poster:

View File

@@ -137,9 +137,9 @@ search:
_id: _id:
selector: id selector: id
details: details:
text: "{{ .Config.sitelink }}torrent/{{ .Result._id }}/" text: "/torrent/{{ .Result._id }}/"
download: download:
text: "{{ .Config.sitelink }}api/v1/torrents/download/{{ .Result._id }}" text: "/api/v1/torrents/download/{{ .Result._id }}"
imdbid: imdbid:
selector: imdbid2 selector: imdbid2
imdbid_full: imdbid_full:
@@ -150,7 +150,7 @@ search:
selector: firstpic selector: firstpic
poster_imdb: poster_imdb:
optional: true 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: poster:
text: "{{ if .Result.poster_imdb }}{{ .Result.poster_imdb }}{{ else }}{{ .Result.poster_normal }}{{ end }}" text: "{{ if .Result.poster_imdb }}{{ .Result.poster_imdb }}{{ else }}{{ .Result.poster_normal }}{{ end }}"
date: date:

View File

@@ -112,9 +112,9 @@ search:
title: title:
text: "{{ if .Result.title_notenglish }}{{ .Result.title_notenglish }}{{ else }}{{ .Result.title_english }}{{ end }}" text: "{{ if .Result.title_notenglish }}{{ .Result.title_notenglish }}{{ else }}{{ .Result.title_english }}{{ end }}"
details: details:
text: "{{ .Config.sitelink }}torrents.php?torrentid={{ .Result._id }}" text: "/torrents.php?torrentid={{ .Result._id }}"
download: download:
text: "{{ .Config.sitelink }}torrents.php?action=download&id={{ .Result._id }}" text: "/torrents.php?action=download&id={{ .Result._id }}"
poster: poster:
selector: ..cover selector: ..cover
imdbid: imdbid:

View File

@@ -61,13 +61,13 @@ search:
title: title:
selector: releaseName selector: releaseName
details: details:
text: "{{ .Config.sitelink }}browse/{{ .Result._id }}" text: "/browse/{{ .Result._id }}"
_apikey: _apikey:
text: "{{ .Config.apikey }}" text: "{{ .Config.apikey }}"
filters: filters:
- name: urlencode - name: urlencode
download: download:
text: "{{ .Config.sitelink }}api/v1/torrents/{{ .Result._id }}/torrent?key={{ .Result._apikey }}" text: "/api/v1/torrents/{{ .Result._id }}/torrent?key={{ .Result._apikey }}"
date: date:
selector: createdAt selector: createdAt
size: size:

View File

@@ -38,7 +38,7 @@ search:
- name: replace - name: replace
args: ["[Nipponsei] ", ""] args: ["[Nipponsei] ", ""]
details: details:
text: "{{ .Config.sitelink }}" text: /
download: download:
selector: a selector: a
attribute: href attribute: href

View File

@@ -40,7 +40,7 @@ search:
title: title:
selector: raw_title selector: raw_title
details: details:
text: "{{ .Config.sitelink }}" text: /
date: date:
selector: pubDate selector: pubDate
download: download:

View File

@@ -127,9 +127,9 @@ search:
_id: _id:
selector: id selector: id
details: details:
text: "{{ .Config.sitelink }}torrent/{{ .Result._id }}/" text: "/torrent/{{ .Result._id }}/"
download: download:
text: "{{ .Config.sitelink }}api/v1/torrents/download/{{ .Result._id }}" text: "/api/v1/torrents/download/{{ .Result._id }}"
imdbid: imdbid:
selector: imdbid2 selector: imdbid2
imdbid_full: imdbid_full:
@@ -140,7 +140,7 @@ search:
selector: customcover selector: customcover
poster_imdb: poster_imdb:
optional: true 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: poster:
text: "{{ if .Result.poster_imdb }}{{ .Result.poster_imdb }}{{ else }}{{ .Result.poster_normal }}{{ end }}" text: "{{ if .Result.poster_imdb }}{{ .Result.poster_imdb }}{{ else }}{{ .Result.poster_normal }}{{ end }}"
date: date:

View File

@@ -174,9 +174,9 @@ search:
_filename: _filename:
selector: filename selector: filename
details: details:
text: "{{ .Config.sitelink }}torrent/{{ .Result._id }}" text: "/torrent/{{ .Result._id }}"
download: download:
text: "{{ .Config.sitelink }}download/{{ .Result._id }}/{{ .Result._filename }}" text: "/download/{{ .Result._id }}/{{ .Result._filename }}"
genre: genre:
selector: tags selector: tags
filters: filters:

View File

@@ -137,7 +137,7 @@ search:
- name: regexp - name: regexp
args: (\d+) args: (\d+)
download: download:
text: "{{ .Config.sitelink }}download/{{ .Result._id }}/" text: "/download/{{ .Result._id }}/"
title_hungarian: title_hungarian:
selector: a[href^="/details/"] selector: a[href^="/details/"]
attribute: title attribute: title

View File

@@ -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 # 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 }}" text: "{{ if .Result.category_is_tv_show }}Video(TV shows){{ else }}{{ .Result.category_provided }}{{ end }}"
details: details:
# there is no details page so we use the sitelink text: /
text: "{{ .Config.sitelink }}"
download: download:
selector: a[href^="magnet:?"] selector: a[href^="magnet:?"]
attribute: href attribute: href

View File

@@ -437,7 +437,7 @@ search:
category: category:
selector: td:nth-child(1) > div.hidden selector: td:nth-child(1) > div.hidden
download: download:
text: "{{ .Config.sitelink }}engine/download_torrent?id={{ .Result._id }}" text: "/engine/download_torrent?id={{ .Result._id }}"
date: date:
# unix # unix
selector: td:nth-child(5) > div.hidden selector: td:nth-child(5) > div.hidden

View File

@@ -441,7 +441,7 @@ search:
category: category:
selector: td:nth-child(1) > div.hidden selector: td:nth-child(1) > div.hidden
download: download:
text: "{{ .Config.sitelink }}engine/download_torrent?id={{ .Result._id }}" text: "/engine/download_torrent?id={{ .Result._id }}"
date: date:
# unix # unix
selector: td:nth-child(5) > div.hidden selector: td:nth-child(5) > div.hidden