mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
add torrentland-api. resolves #13768
This commit is contained in:
192
src/Jackett.Common/Definitions/torrentland-api.yml
Normal file
192
src/Jackett.Common/Definitions/torrentland-api.yml
Normal file
@@ -0,0 +1,192 @@
|
|||||||
|
---
|
||||||
|
id: torrentland-api
|
||||||
|
name: Torrentland (API)
|
||||||
|
description: "Torrentland is a SPANISH Private Torrent Tracker for MOVIES / TV / GENERAL"
|
||||||
|
language: es-ES
|
||||||
|
type: private
|
||||||
|
encoding: UTF-8
|
||||||
|
links:
|
||||||
|
- https://torrentland.li/
|
||||||
|
|
||||||
|
caps:
|
||||||
|
categorymappings:
|
||||||
|
- {id: 1, cat: Movies, desc: "Películas"}
|
||||||
|
- {id: 2, cat: TV, desc: "Series"}
|
||||||
|
- {id: 3, cat: TV/Anime, desc: "Animación"}
|
||||||
|
- {id: 4, cat: TV/Anime, desc: "Series Animación"}
|
||||||
|
- {id: 5, cat: TV/Documentary, desc: "Documentales"}
|
||||||
|
- {id: 6, cat: TV/Documentary, desc: "Series Documentales"}
|
||||||
|
- {id: 7, cat: TV/Sport, desc: "Deportes"}
|
||||||
|
- {id: 8, cat: Audio/Video, desc: "Videos Músicales"}
|
||||||
|
- {id: 9, cat: XXX, desc: "+18"}
|
||||||
|
- {id: 10, cat: Other, desc: "Otros"}
|
||||||
|
|
||||||
|
modes:
|
||||||
|
search: [q]
|
||||||
|
tv-search: [q, season, ep, imdbid, tvdbid, tmdbid]
|
||||||
|
movie-search: [q, imdbid, tmdbid]
|
||||||
|
music-search: [q]
|
||||||
|
book-search: [q]
|
||||||
|
|
||||||
|
settings:
|
||||||
|
- name: apikey
|
||||||
|
type: text
|
||||||
|
label: APIKey
|
||||||
|
- name: info_key
|
||||||
|
type: info
|
||||||
|
label: About your API key
|
||||||
|
default: "Find or Generate a new API Token by accessing your <a href=\"https://torrentland.li/\" target =_blank>Torrentland</a> account <i>My Security</i> page and clicking on the <b>API Token</b> tab."
|
||||||
|
- name: freeleech
|
||||||
|
type: checkbox
|
||||||
|
label: Search freeleech only
|
||||||
|
default: false
|
||||||
|
- name: compatOld
|
||||||
|
type: checkbox
|
||||||
|
label: Improve Sonarr compatibility with the tracker's older season naming scheme by renaming Sxx to Txx in searches. Can cause results already using Sxx to not be found.
|
||||||
|
default: false
|
||||||
|
- name: sort
|
||||||
|
type: select
|
||||||
|
label: Sort requested from site
|
||||||
|
default: created_at
|
||||||
|
options:
|
||||||
|
created_at: created
|
||||||
|
seeders: seeders
|
||||||
|
size: size
|
||||||
|
name: title
|
||||||
|
- name: type
|
||||||
|
type: select
|
||||||
|
label: Order requested from site
|
||||||
|
default: desc
|
||||||
|
options:
|
||||||
|
desc: desc
|
||||||
|
asc: asc
|
||||||
|
- name: info_thanks
|
||||||
|
type: info
|
||||||
|
label: About Thanks
|
||||||
|
default: "Torrentland requires all downloads to be thanked. After initiating a download with this indexer, use your browser to visit the torrent details page and click the thank you button. Failure to maintain a 1:1 thank ratio will lead to loss of RSS and API access."
|
||||||
|
|
||||||
|
login:
|
||||||
|
path: /api/torrents
|
||||||
|
method: get
|
||||||
|
error:
|
||||||
|
- selector: a[href*="/login"]
|
||||||
|
message:
|
||||||
|
text: "The API key was not accepted by {{ .Config.sitelink }}."
|
||||||
|
|
||||||
|
search:
|
||||||
|
paths:
|
||||||
|
# https://hdinnovations.github.io/UNIT3D-Community-Edition-Docs/api_endpoints.html
|
||||||
|
# https://github.com/HDInnovations/UNIT3D-Community-Edition/blob/master/app/Http/Controllers/API/TorrentController.php
|
||||||
|
- path: "/api/torrents/filter"
|
||||||
|
response:
|
||||||
|
type: json
|
||||||
|
|
||||||
|
headers:
|
||||||
|
Authorization: ["Bearer {{ .Config.apikey }}"]
|
||||||
|
|
||||||
|
inputs:
|
||||||
|
# if we have an id based search, add Season and Episode as query in name for UNIT3D < v6. Else pass S/E Params for UNIT3D >= v6
|
||||||
|
$raw: "{{ range .Categories }}&categories[]={{.}}{{end}}"
|
||||||
|
name: "{{ .Keywords }}"
|
||||||
|
seasonNumber: "{{ .Query.Season }}"
|
||||||
|
episodeNumber: "{{ .Query.Ep }}"
|
||||||
|
imdbId: "{{ .Query.IMDBIDShort }}"
|
||||||
|
tmdbId: "{{ .Query.TMDBID }}"
|
||||||
|
tvdbId: "{{ .Query.TVDBID }}"
|
||||||
|
free: "{{ if .Config.freeleech }}1{{ else }}{{ end }}"
|
||||||
|
sortField: "{{ .Config.sort }}"
|
||||||
|
sortDirection: "{{ .Config.type }}"
|
||||||
|
perPage: 100
|
||||||
|
|
||||||
|
keywordsfilters:
|
||||||
|
- name: re_replace
|
||||||
|
args: ["\\.", " "]
|
||||||
|
- name: re_replace
|
||||||
|
args: ["(?i)\\bS(\\d+)", "{{ if .Config.compatOld }}T$1{{ else }}S$1{{ end }}"]
|
||||||
|
|
||||||
|
rows:
|
||||||
|
selector: data
|
||||||
|
attribute: attributes
|
||||||
|
|
||||||
|
fields:
|
||||||
|
category:
|
||||||
|
selector: category_id
|
||||||
|
title_vose:
|
||||||
|
selector: name:contains(VOSE)
|
||||||
|
optional: true
|
||||||
|
filters:
|
||||||
|
- name: append
|
||||||
|
args: " ENGLiSH"
|
||||||
|
title_notvose:
|
||||||
|
selector: name:not(:contains(VOSE))
|
||||||
|
optional: true
|
||||||
|
filters:
|
||||||
|
- name: append
|
||||||
|
args: " SPANiSH"
|
||||||
|
title:
|
||||||
|
text: "{{ if .Result.title_vose }}{{ .Result.title_vose }}{{ else }}{{ .Result.title_notvose }}{{ end }}"
|
||||||
|
filters:
|
||||||
|
- name: re_replace
|
||||||
|
args: ["^ *\\[[^\\]]*\\] *", ""] # Remove prefix tags
|
||||||
|
- name: re_replace
|
||||||
|
args: ["(?i)\\bT(\\d+)", "S$1"]
|
||||||
|
- name: re_replace
|
||||||
|
args: ["UHDRip", "BDRip"] # Fix for Radarr
|
||||||
|
details:
|
||||||
|
selector: details_link
|
||||||
|
download:
|
||||||
|
selector: download_link
|
||||||
|
infohash:
|
||||||
|
selector: info_hash
|
||||||
|
poster:
|
||||||
|
selector: poster
|
||||||
|
filters:
|
||||||
|
- name: replace
|
||||||
|
args: ["https://via.placeholder.com/90x135", ""]
|
||||||
|
imdbid:
|
||||||
|
selector: imdb_id
|
||||||
|
tmdbid:
|
||||||
|
selector: tmdb_id
|
||||||
|
tvdbid:
|
||||||
|
selector: tvdb_id
|
||||||
|
files:
|
||||||
|
selector: num_file
|
||||||
|
seeders:
|
||||||
|
selector: seeders
|
||||||
|
leechers:
|
||||||
|
selector: leechers
|
||||||
|
grabs:
|
||||||
|
selector: times_completed
|
||||||
|
date:
|
||||||
|
# "created_at": "2021-10-18T00:34:50.000000Z" is returned by Newtonsoft.Json.Linq as 18/10/2021 00:34:50
|
||||||
|
selector: created_at
|
||||||
|
filters:
|
||||||
|
- name: append
|
||||||
|
args: " +00:00" # GMT
|
||||||
|
- name: dateparse
|
||||||
|
args: "MM/dd/yyyy HH:mm:ss zzz"
|
||||||
|
size:
|
||||||
|
selector: size
|
||||||
|
downloadvolumefactor:
|
||||||
|
# api returns 0%, 25%, 50%, 75%, 100%
|
||||||
|
selector: freeleech
|
||||||
|
case:
|
||||||
|
0%: 1 # not free
|
||||||
|
25%: 0.75
|
||||||
|
50%: 0.5
|
||||||
|
75%: 0.25
|
||||||
|
100%: 0 # freeleech
|
||||||
|
"*": 0 # catch errors
|
||||||
|
uploadvolumefactor:
|
||||||
|
# api returns 0=false, 1=true
|
||||||
|
selector: double_upload
|
||||||
|
case:
|
||||||
|
0: 1 # normal
|
||||||
|
1: 2 # double
|
||||||
|
# global MR is 0.4 but torrents must be seeded for 4 days regardless of ratio
|
||||||
|
# minimumratio:
|
||||||
|
# text: 0.4
|
||||||
|
minimumseedtime:
|
||||||
|
# 4 days (as seconds = 4 x 24 x 60 x 60)
|
||||||
|
text: 345600
|
||||||
|
# json UNIT3D 6.3.0 (custom)
|
@@ -592,7 +592,6 @@ namespace Jackett.Updater
|
|||||||
"Definitions/torrentgalaxyorg.yml", // renamed to torrentgalaxy
|
"Definitions/torrentgalaxyorg.yml", // renamed to torrentgalaxy
|
||||||
"Definitions/torrenthane.yml",
|
"Definitions/torrenthane.yml",
|
||||||
"Definitions/torrentkim.yml",
|
"Definitions/torrentkim.yml",
|
||||||
"Definitions/torrentland-api.yml", // switch to HTML #13768
|
|
||||||
"Definitions/torrentmax.yml",
|
"Definitions/torrentmax.yml",
|
||||||
"Definitions/torrentparadise.yml",
|
"Definitions/torrentparadise.yml",
|
||||||
"Definitions/torrentproject.yml",
|
"Definitions/torrentproject.yml",
|
||||||
|
Reference in New Issue
Block a user