mirror of https://github.com/Jackett/Jackett
parent
2a7a950d63
commit
3e9165ce4a
|
@ -100,7 +100,8 @@ namespace Jackett.Controllers
|
|||
ApiKey = request.passkey,
|
||||
Categories = MOVIE_CATS,
|
||||
SearchTerm = request.search,
|
||||
ImdbID = request.imdbid
|
||||
ImdbID = request.imdbid,
|
||||
QueryType = "TorrentPotato"
|
||||
};
|
||||
|
||||
IEnumerable<ReleaseInfo> releases = new List<ReleaseInfo>();
|
||||
|
|
|
@ -54,6 +54,7 @@ namespace Jackett.Indexers
|
|||
AddCategoryMapping(25, TorznabCatType.MoviesSD);
|
||||
AddCategoryMapping(11, TorznabCatType.MoviesHD);
|
||||
AddCategoryMapping(5, TorznabCatType.MoviesHD);
|
||||
AddCategoryMapping(48, TorznabCatType.Movies);
|
||||
AddCategoryMapping(3, TorznabCatType.MoviesSD);
|
||||
AddCategoryMapping(21, TorznabCatType.MoviesSD);
|
||||
AddCategoryMapping(22, TorznabCatType.MoviesForeign);
|
||||
|
@ -154,8 +155,15 @@ namespace Jackett.Indexers
|
|||
var queryUrl = SearchUrl;
|
||||
var queryCollection = new NameValueCollection();
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(searchString))
|
||||
queryCollection.Add("search", searchString);
|
||||
if (query.QueryType == "TorrentPotato" && !string.IsNullOrWhiteSpace(query.ImdbID) && query.ImdbID.ToLower().StartsWith("tt"))
|
||||
{
|
||||
queryCollection.Add("search", query.ImdbID);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(searchString))
|
||||
queryCollection.Add("search", searchString);
|
||||
}
|
||||
|
||||
foreach (var cat in MapTorznabCapsToTrackers(query))
|
||||
queryCollection.Add("c" + cat, "1");
|
||||
|
|
Loading…
Reference in New Issue