mirror of
https://github.com/Jackett/Jackett
synced 2025-02-25 15:42:48 +00:00
Merge pull request #279 from flightlevel/tehconnection
TehConnection: Fix IMDB ID searches
This commit is contained in:
commit
bda73dc9c1
3 changed files with 11 additions and 2 deletions
|
@ -99,7 +99,8 @@ namespace Jackett.Controllers
|
||||||
{
|
{
|
||||||
ApiKey = request.passkey,
|
ApiKey = request.passkey,
|
||||||
Categories = MOVIE_CATS,
|
Categories = MOVIE_CATS,
|
||||||
SearchTerm = request.search
|
SearchTerm = request.search,
|
||||||
|
ImdbID = request.imdbid
|
||||||
};
|
};
|
||||||
|
|
||||||
IEnumerable<ReleaseInfo> releases = new List<ReleaseInfo>();
|
IEnumerable<ReleaseInfo> releases = new List<ReleaseInfo>();
|
||||||
|
|
|
@ -103,9 +103,16 @@ namespace Jackett.Indexers
|
||||||
if (string.IsNullOrEmpty(query.GetQueryString()))
|
if (string.IsNullOrEmpty(query.GetQueryString()))
|
||||||
movieListSearchUrl = SearchUrl;
|
movieListSearchUrl = SearchUrl;
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(query.ImdbID))
|
||||||
|
{
|
||||||
|
movieListSearchUrl = string.Format("{0}?action=basic&searchstr={1}", SearchUrl, HttpUtility.UrlEncode(query.ImdbID));
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
movieListSearchUrl = string.Format("{0}?action=basic&searchstr={1}", SearchUrl, HttpUtility.UrlEncode(query.GetQueryString()));
|
movieListSearchUrl = string.Format("{0}?action=basic&searchstr={1}", SearchUrl, HttpUtility.UrlEncode(query.GetQueryString()));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var results = await RequestStringWithCookiesAndRetry(movieListSearchUrl);
|
var results = await RequestStringWithCookiesAndRetry(movieListSearchUrl);
|
||||||
try
|
try
|
||||||
|
|
|
@ -18,6 +18,7 @@ namespace Jackett.Models
|
||||||
public int Limit { get; set; }
|
public int Limit { get; set; }
|
||||||
public int Offset { get; set; }
|
public int Offset { get; set; }
|
||||||
public int RageID { get; set; }
|
public int RageID { get; set; }
|
||||||
|
public string ImdbID { get; set; }
|
||||||
|
|
||||||
public int Season { get; set; }
|
public int Season { get; set; }
|
||||||
public string Episode { get; set; }
|
public string Episode { get; set; }
|
||||||
|
|
Loading…
Reference in a new issue