mirror of https://github.com/Jackett/Jackett
cardigann: fix .query.season (#12857)
Co-authored-by: Qstick <qstick@users.noreply.github.com>
This commit is contained in:
parent
3afd31ea1c
commit
67e054468d
|
@ -63,10 +63,19 @@ 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
|
||||
attribute: attributes
|
||||
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
|
||||
|
@ -134,4 +143,4 @@ search:
|
|||
minimumseedtime:
|
||||
# 7 day (as seconds = 7 x 24 x 60 x 60)
|
||||
text: 604800
|
||||
# json UNIT3D 5.3.1b
|
||||
# json UNIT3D 6.0.0 beta
|
||||
|
|
|
@ -1259,19 +1259,19 @@ namespace Jackett.Common.Indexers
|
|||
variables[".Query.Q"] = query.SearchTerm;
|
||||
variables[".Query.Series"] = null;
|
||||
variables[".Query.Ep"] = query.Episode;
|
||||
variables[".Query.Season"] = query.Season;
|
||||
variables[".Query.Season"] = query.Season > 0 ? query.Season.ToString() : null;
|
||||
variables[".Query.Movie"] = null;
|
||||
variables[".Query.Year"] = query.Year.ToString();
|
||||
variables[".Query.Limit"] = query.Limit.ToString();
|
||||
variables[".Query.Offset"] = query.Offset.ToString();
|
||||
variables[".Query.Year"] = query.Year?.ToString() ?? null;
|
||||
variables[".Query.Limit"] = query.Limit.ToString() ?? null;
|
||||
variables[".Query.Offset"] = query.Offset.ToString() ?? null;
|
||||
variables[".Query.Extended"] = query.Extended.ToString();
|
||||
variables[".Query.Categories"] = query.Categories;
|
||||
variables[".Query.APIKey"] = query.ApiKey;
|
||||
variables[".Query.TVDBID"] = query.TvdbID.ToString();
|
||||
variables[".Query.TVRageID"] = query.RageID;
|
||||
variables[".Query.TVDBID"] = query.TvdbID?.ToString() ?? null;
|
||||
variables[".Query.TVRageID"] = query.RageID?.ToString() ?? null;
|
||||
variables[".Query.IMDBID"] = query.ImdbID;
|
||||
variables[".Query.IMDBIDShort"] = query.ImdbIDShort;
|
||||
variables[".Query.TMDBID"] = query.TmdbID.ToString();
|
||||
variables[".Query.TMDBID"] = query.TmdbID?.ToString() ?? null;
|
||||
variables[".Query.TVMazeID"] = null;
|
||||
variables[".Query.TraktID"] = null;
|
||||
variables[".Query.Album"] = query.Album;
|
||||
|
|
Loading…
Reference in New Issue