PassThePopcorn: enable IMDB search

This commit is contained in:
kaso17 2017-01-16 17:23:51 +01:00
parent af1aa408c9
commit 1c9213e7f1
1 changed files with 12 additions and 11 deletions

View File

@ -45,6 +45,8 @@ namespace Jackett.Indexers
Encoding = Encoding.UTF8;
Language = "en-us";
TorznabCaps.SupportsImdbSearch = true;
AddCategoryMapping(1, TorznabCatType.Movies);
AddCategoryMapping(1, TorznabCatType.MoviesForeign);
AddCategoryMapping(1, TorznabCatType.MoviesOther);
@ -95,18 +97,17 @@ namespace Jackett.Indexers
bool configCheckedOnly = configData.FilterString.Value.ToLowerInvariant().Contains("checked");
string movieListSearchUrl;
if (string.IsNullOrEmpty(query.GetQueryString()))
movieListSearchUrl = string.Format("{0}?json=noredirect", SearchUrl);
else
if (!string.IsNullOrEmpty(query.ImdbID))
{
if (!string.IsNullOrEmpty(query.ImdbID))
{
movieListSearchUrl = string.Format("{0}?json=noredirect&searchstr={1}", SearchUrl, HttpUtility.UrlEncode(query.ImdbID));
}
else
{
movieListSearchUrl = string.Format("{0}?json=noredirect&searchstr={1}", SearchUrl, HttpUtility.UrlEncode(query.GetQueryString()));
}
movieListSearchUrl = string.Format("{0}?json=noredirect&searchstr={1}", SearchUrl, HttpUtility.UrlEncode(query.ImdbID));
}
else if(!string.IsNullOrEmpty(query.GetQueryString()))
{
movieListSearchUrl = string.Format("{0}?json=noredirect&searchstr={1}", SearchUrl, HttpUtility.UrlEncode(query.GetQueryString()));
}
else
{
movieListSearchUrl = string.Format("{0}?json=noredirect", SearchUrl);
}
var results = await RequestStringWithCookiesAndRetry(movieListSearchUrl);