From 15fe1e1672a9e6895ddb9c9543df12841a70081a Mon Sep 17 00:00:00 2001 From: Garfield69 Date: Sun, 25 Sep 2022 16:53:33 +1300 Subject: [PATCH] desitorrents: upgrade for 6.4.1 resolves #13554 add alternate domain add genre results update category, DLVF, poster selectors add genre and description update engine tag --- .../Definitions/desitorrents-api.yml | 44 +++++++++++++++---- 1 file changed, 35 insertions(+), 9 deletions(-) diff --git a/src/Jackett.Common/Definitions/desitorrents-api.yml b/src/Jackett.Common/Definitions/desitorrents-api.yml index eecbd1848..9ee2517c9 100644 --- a/src/Jackett.Common/Definitions/desitorrents-api.yml +++ b/src/Jackett.Common/Definitions/desitorrents-api.yml @@ -8,6 +8,7 @@ encoding: UTF-8 links: - https://desitorrents.tv/ - https://desitorrents.rocks/ + - https://torrent.desi/ caps: categorymappings: @@ -64,13 +65,23 @@ 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: [^$, "%"] + args: ["\\.", " "] rows: selector: data @@ -79,8 +90,8 @@ search: selector: meta.total fields: - categorydesc: - selector: category + category: + selector: category_id title: selector: name details: @@ -88,7 +99,7 @@ search: download: selector: download_link poster: - selector: poster + selector: meta.poster filters: - name: replace args: ["https://via.placeholder.com/90x135", ""] @@ -98,6 +109,17 @@ search: selector: tmdb_id tvdbid: selector: tvdb_id + genre: + selector: meta.genres + filters: + - name: re_replace + args: ["(?i)(Science Fiction)", "Science_Fiction"] + - name: re_replace + args: ["(?i)(TV Movie)", "TV_Movie"] + - name: replace + args: [" & ", "_&_"] + description: + text: "{{ .Result.genre }}" files: selector: num_file seeders: @@ -112,11 +134,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 @@ -128,4 +154,4 @@ search: minimumseedtime: # 7 day (as seconds = 7 x 24 x 60 x 60) text: 604800 -# json UNIT3D 5.3.0 (custom) +# json UNIT3D 6.4.1 (custom)