From 70493a4675bcbd506ba115f4433e4af70d20a4e9 Mon Sep 17 00:00:00 2001 From: Garfield69 Date: Sun, 20 Feb 2022 10:43:17 +1300 Subject: [PATCH] aither: upgrade to unit3d 6.0.1 --- src/Jackett.Common/Definitions/aither-api.yml | 30 +++++++++++++++---- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/src/Jackett.Common/Definitions/aither-api.yml b/src/Jackett.Common/Definitions/aither-api.yml index dc2fbd30f..67e8add4d 100644 --- a/src/Jackett.Common/Definitions/aither-api.yml +++ b/src/Jackett.Common/Definitions/aither-api.yml @@ -71,10 +71,24 @@ 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?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: 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: selector: data attribute: attributes @@ -115,21 +129,25 @@ search: size: selector: size downloadvolumefactor: - # api returns 0=false, 1=true + # api returns 0%, 25%, 50%, 75%, 100% selector: freeleech case: - 0: 1 # not free - 1: 0 # freeleech + 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 3 days regardless of ratio +# global MR is 0.4 but torrents must be seeded for 5 days regardless of ratio # minimumratio: # text: 0.4 minimumseedtime: # 5 days (as seconds = 3 x 24 x 60 x 60) text: 432000 -# json UNIT3D 5.3.0 +# json UNIT3D 6.0.1