Skip to content

Commit

Permalink
jackett indexers as of ce2c72c2589878e2a0b3a12aed04313ea6598a44
Browse files Browse the repository at this point in the history
Fixes #407
  • Loading branch information
mynameisbogdan committed Feb 21, 2024
1 parent 255322d commit 330c5d2
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 19 deletions.
1 change: 1 addition & 0 deletions definitions/v7/cinematik.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ settings:
login:
path: /api/torrents
method: get
inputs: {} # TODO: remove in v10
error:
- selector: a[href*="/login"]
message:
Expand Down
24 changes: 15 additions & 9 deletions definitions/v7/hdolimpo-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ search:
paths:
# https://github.com/HDInnovations/UNIT3D-Community-Edition/wiki/Torrent-API-(UNIT3D-v7.0.0)
# https://github.com/HDInnovations/UNIT3D-Community-Edition/blob/master/app/Http/Controllers/API/TorrentController.php#L349
- path: api/torrents/filter
- path: "/api/torrents/filter"
response:
type: json

Expand All @@ -76,18 +76,22 @@ search:
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
name: "{{ .Keywords }}"
$raw: "{{ if .Query.Season }}&seasonNumber={{ .Query.Season }}{{ else }}{{ end }}{{ if .Query.Ep }}&episodeNumber={{ .Query.Ep }}{{ else }}{{ end }}{{ if .Query.TMDBID }}&tmdbId={{ .Query.TMDBID }}{{ else }}{{ end }}{{ if .Query.IMDBIDShort }}&imdbId={{ .Query.IMDBIDShort }}{{ else }}{{ end }}{{ if .Query.TVDBID }}&tvdbId={{ .Query.TVDBID }}{{ else }}{{ end }}{{ range .Categories }}&categories[]={{.}}{{end}}{{ if .Config.freeleech }}&free=1{{ else }}{{ end }}"
$raw: "{{ if .Query.Season }}&seasonNumber={{ .Query.Season }}{{ else }}{{ end }}{{ if .Query.Ep }}&episodeNumber={{ .Query.Ep }}{{ else }}{{ end }}{{ if .Query.TMDBID }}&tmdbId={{ .Query.TMDBID }}{{ else }}{{ end }}{{ if .Query.IMDBIDShort }}&imdbId={{ .Query.IMDBIDShort }}{{ else }}{{ end }}{{ if .Query.TVDBID }}&tvdbId={{ .Query.TVDBID }}{{ else }}{{ end }}{{ range .Categories }}&categories[]={{.}}{{end}}{{ if .Config.freeleech }}&free[]=100{{ else }}{{ end }}"
sortField: "{{ .Config.sort }}"
sortDirection: "{{ .Config.type }}"
perPage: 100

keywordsfilters:
- name: re_replace
args: ["\\.", " "]

rows:
selector: data
attribute: attributes

fields:
categorydesc:
selector: category
category:
selector: category_id
title:
selector: name
filters:
Expand Down Expand Up @@ -149,8 +153,10 @@ search:
selector: details_link
download:
selector: download_link
infohash:
selector: info_hash
poster:
selector: poster
selector: meta.poster
filters:
- name: replace
args: ["https://via.placeholder.com/90x135", ""]
Expand Down Expand Up @@ -189,12 +195,12 @@ search:
100%: 0 # freeleech
"*": 0 # catch errors
uploadvolumefactor:
# api returns 0=false, 1=true
# api returns False, True
selector: double_upload
case:
0: 1 # normal
1: 2 # double
False: 1 # normal
True: 2 # double
minimumseedtime:
# 4 days (as seconds = 4 x 24 x 60 x 60)
text: 345600
# json UNIT3D 6.0.4
# json UNIT3D 7.x.x
1 change: 1 addition & 0 deletions definitions/v7/jptv-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ settings:
login:
path: /api/torrents
method: get
inputs: {} # TODO: remove in v10
error:
- selector: a[href*="/login"]
message:
Expand Down
1 change: 1 addition & 0 deletions definitions/v7/shareisland-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ caps:
- {id: 7, cat: PC/Games, desc: "Games"}
- {id: 23, cat: PC, desc: "Software"}
- {id: 24, cat: TV/Sport, desc: "EVENTI SPORTIVI"}
- {id: 25, cat: Other, desc: "Misc"}

modes:
search: [q]
Expand Down
26 changes: 16 additions & 10 deletions definitions/v9/hdolimpo-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,34 +66,38 @@ search:
paths:
# https://github.com/HDInnovations/UNIT3D-Community-Edition/wiki/Torrent-API-(UNIT3D-v7.0.0)
# https://github.com/HDInnovations/UNIT3D-Community-Edition/blob/master/app/Http/Controllers/API/TorrentController.php#L349
- path: api/torrents/filter
- 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
# 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 }}"
"free[]": "{{ if .Config.freeleech }}100{{ else }}{{ end }}"
sortField: "{{ .Config.sort }}"
sortDirection: "{{ .Config.type }}"
perPage: 100

keywordsfilters:
- name: re_replace
args: ["\\.", " "]

rows:
selector: data
attribute: attributes

fields:
categorydesc:
selector: category
category:
selector: category_id
title:
selector: name
filters:
Expand Down Expand Up @@ -155,8 +159,10 @@ search:
selector: details_link
download:
selector: download_link
infohash:
selector: info_hash
poster:
selector: poster
selector: meta.poster
filters:
- name: replace
args: ["https://via.placeholder.com/90x135", ""]
Expand Down Expand Up @@ -195,12 +201,12 @@ search:
100%: 0 # freeleech
"*": 0 # catch errors
uploadvolumefactor:
# api returns 0=false, 1=true
# api returns False, True
selector: double_upload
case:
0: 1 # normal
1: 2 # double
False: 1 # normal
True: 2 # double
minimumseedtime:
# 4 days (as seconds = 4 x 24 x 60 x 60)
text: 345600
# json UNIT3D 6.0.4
# json UNIT3D 7.x.x
1 change: 1 addition & 0 deletions definitions/v9/shareisland-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ caps:
- {id: 7, cat: PC/Games, desc: "Games"}
- {id: 23, cat: PC, desc: "Software"}
- {id: 24, cat: TV/Sport, desc: "EVENTI SPORTIVI"}
- {id: 25, cat: Other, desc: "Misc"}

modes:
search: [q]
Expand Down

0 comments on commit 330c5d2

Please sign in to comment.