From e4605f82b9c4b44cd101cbeada79ee7cdaaa165f Mon Sep 17 00:00:00 2001 From: Garfield69 Date: Fri, 11 Feb 2022 07:05:30 +1300 Subject: [PATCH] shareisland: upgrade for unit3d 6.0.0 resolves #12936 --- .../Definitions/shareisland-api.yml | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/src/Jackett.Common/Definitions/shareisland-api.yml b/src/Jackett.Common/Definitions/shareisland-api.yml index 103e31e76..a4e2d2d84 100644 --- a/src/Jackett.Common/Definitions/shareisland-api.yml +++ b/src/Jackett.Common/Definitions/shareisland-api.yml @@ -72,10 +72,20 @@ 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: diacritics args: replace @@ -148,11 +158,15 @@ 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 @@ -165,4 +179,4 @@ search: minimumseedtime: # 7 day (as seconds = 7 x 24 x 60 x 60) text: 604800 -# json UNIT3D 5.3.0 +# json UNIT3D 6.0.0