Revert "hdolimpo-api: update for UNIT3D 7.x"

This reverts commit ce2c72c258.
The site is not running unit3d 7.x.x as the api aoutput still indicates a 6.x.x layout
This commit is contained in:
Garfield69
2024-02-22 08:43:09 +13:00
parent d396ffc43f
commit 4bdef1b390

View File

@@ -65,7 +65,7 @@ search:
paths: paths:
# https://github.com/HDInnovations/UNIT3D-Community-Edition/wiki/Torrent-API-(UNIT3D-v7.0.0) # 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 # 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: response:
type: json type: json
@@ -73,7 +73,7 @@ search:
Authorization: ["Bearer {{ .Config.apikey }}"] Authorization: ["Bearer {{ .Config.apikey }}"]
inputs: 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}}" $raw: "{{ range .Categories }}&categories[]={{.}}{{end}}"
name: "{{ .Keywords }}" name: "{{ .Keywords }}"
seasonNumber: "{{ .Query.Season }}" seasonNumber: "{{ .Query.Season }}"
@@ -81,22 +81,18 @@ search:
imdbId: "{{ .Query.IMDBIDShort }}" imdbId: "{{ .Query.IMDBIDShort }}"
tmdbId: "{{ .Query.TMDBID }}" tmdbId: "{{ .Query.TMDBID }}"
tvdbId: "{{ .Query.TVDBID }}" tvdbId: "{{ .Query.TVDBID }}"
"free[]": "{{ if .Config.freeleech }}100{{ else }}{{ end }}" free: "{{ if .Config.freeleech }}1{{ else }}{{ end }}"
sortField: "{{ .Config.sort }}" sortField: "{{ .Config.sort }}"
sortDirection: "{{ .Config.type }}" sortDirection: "{{ .Config.type }}"
perPage: 100 perPage: 100
keywordsfilters:
- name: re_replace
args: ["\\.", " "]
rows: rows:
selector: data selector: data
attribute: attributes attribute: attributes
fields: fields:
category: categorydesc:
selector: category_id selector: category
title: title:
selector: name selector: name
filters: filters:
@@ -158,10 +154,8 @@ search:
selector: details_link selector: details_link
download: download:
selector: download_link selector: download_link
infohash:
selector: info_hash
poster: poster:
selector: meta.poster selector: poster
filters: filters:
- name: replace - name: replace
args: ["https://via.placeholder.com/90x135", ""] args: ["https://via.placeholder.com/90x135", ""]
@@ -200,12 +194,12 @@ search:
100%: 0 # freeleech 100%: 0 # freeleech
"*": 0 # catch errors "*": 0 # catch errors
uploadvolumefactor: uploadvolumefactor:
# api returns False, True # api returns 0=false, 1=true
selector: double_upload selector: double_upload
case: case:
False: 1 # normal 0: 1 # normal
True: 2 # double 1: 2 # double
minimumseedtime: minimumseedtime:
# 4 days (as seconds = 4 x 24 x 60 x 60) # 4 days (as seconds = 4 x 24 x 60 x 60)
text: 345600 text: 345600
# json UNIT3D 7.x.x # json UNIT3D 6.0.4