generation-free: upgrade to unit3d API 6.0.4 resolves #5279

This commit is contained in:
Garfield69 2022-03-17 15:17:53 +13:00
parent 1161585df1
commit cb7dc73b0e
1 changed files with 25 additions and 9 deletions

View File

@ -88,10 +88,24 @@ search:
paths: paths:
# https://hdinnovations.github.io/UNIT3D-Community-Edition-Docs/api_endpoints.html # 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 # https://github.com/HDInnovations/UNIT3D-Community-Edition/blob/master/app/Http/Controllers/API/TorrentController.php
- path: "/api/torrents/filter?api_token={{ .Config.apikey }}&name={{ if .Query.IMDBID }}{{ else }}{{ .Keywords }}{{ 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 }}&sortField={{ .Config.sort }}&sortDirection={{ .Config.type }}&perPage=100&page=1{{ range .Categories }}&categories[]={{.}}{{end}}{{ if .Config.freeleech }}&free=1{{ else }}{{ end }}" - path: "/api/torrents/filter"
response: response:
type: json type: json
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
api_token: "{{ .Config.apikey }}"
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 }}"
sortField: "{{ .Config.sort }}"
sortDirection: "{{ .Config.type }}"
perPage: 100
page: 1
keywordsfilters:
- name: re_replace
args: ["\\.", " "]
rows: rows:
selector: data selector: data
attribute: attributes attribute: attributes
@ -124,8 +138,6 @@ search:
selector: details_link selector: details_link
download: download:
selector: download_link selector: download_link
size:
selector: size
magnet: magnet:
selector: magnet_link selector: magnet_link
optional: true optional: true
@ -134,8 +146,6 @@ search:
filters: filters:
- name: replace - name: replace
args: ["https://via.placeholder.com/90x135", ""] args: ["https://via.placeholder.com/90x135", ""]
- name: replace
args: ["https://via.placeholder.com/400x600", ""]
imdbid: imdbid:
selector: imdb_id selector: imdb_id
tmdbid: tmdbid:
@ -153,12 +163,18 @@ search:
date: date:
# 2021-10-18T00:34:50.000000Z" # 2021-10-18T00:34:50.000000Z"
selector: created_at selector: created_at
size:
selector: size
downloadvolumefactor: downloadvolumefactor:
# api returns 0=false, 1=true # api returns 0%, 25%, 50%, 75%, 100%
selector: freeleech selector: freeleech
case: case:
0: 1 # not free 0%: 1 # not free
1: 0 # freeleech 25%: 0.75
50%: 0.5
75%: 0.25
100%: 0 # freeleech
"*": 0 # catch errors
uploadvolumefactor: uploadvolumefactor:
# api returns 0=false, 1=true # api returns 0=false, 1=true
selector: double_upload selector: double_upload
@ -168,4 +184,4 @@ search:
minimumseedtime: minimumseedtime:
# 2 days (as seconds = 2 x 24 x 60 x 60) # 2 days (as seconds = 2 x 24 x 60 x 60)
text: 172800 text: 172800
# json UNIT3D 5.3.0 # json UNIT3D 6.0.4