mirror of https://github.com/Jackett/Jackett
* Fixed the TorrentPotato requests with the indexers that does not support imdbid requests * Fixed the "CanHandleQuery" which was not working if we make the request only with an imdbid (and a valid OMDB key) * Fixed the "CanHandleQuery" which was not working if we make the request only with an imdbid (and a valid OMDB key) * Removed PotatoController.cs
This commit is contained in:
parent
7f5d00e89f
commit
4e04bbbcf4
|
@ -189,22 +189,29 @@ namespace Jackett.Indexers
|
|||
{
|
||||
if (query == null)
|
||||
return false;
|
||||
var caps = TorznabCaps;
|
||||
if (!caps.SearchAvailable && query.IsSearch)
|
||||
return false;
|
||||
if (!caps.TVSearchAvailable && query.IsTVSearch)
|
||||
return false;
|
||||
if (!caps.MovieSearchAvailable && query.IsMovieSearch)
|
||||
return false;
|
||||
if (!caps.SupportsTVRageSearch && query.IsTVRageSearch)
|
||||
return false;
|
||||
if (!caps.SupportsImdbSearch && query.IsImdbQuery)
|
||||
return false;
|
||||
|
||||
var caps = TorznabCaps;
|
||||
|
||||
// If a category is specified but the indexer does not support it, we do not hnadle the query
|
||||
// to avoid returning unexpected releases (tv shows instead of movies etc)
|
||||
if (query.HasSpecifiedCategories)
|
||||
if (!caps.SupportsCategories(query.Categories))
|
||||
return false;
|
||||
return true;
|
||||
|
||||
// If at least one search is possible, the indexer is able to handle this query
|
||||
if (caps.SearchAvailable && query.IsSearch)
|
||||
return true;
|
||||
if (caps.TVSearchAvailable && query.IsTVSearch)
|
||||
return true;
|
||||
if (caps.MovieSearchAvailable && query.IsMovieSearch)
|
||||
return true;
|
||||
if (caps.SupportsTVRageSearch && query.IsTVRageSearch)
|
||||
return true;
|
||||
if (caps.SupportsImdbSearch && query.IsImdbQuery)
|
||||
return true;
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public void Unconfigure()
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
Categories = new int[1] { TorznabCatType.Movies.ID },
|
||||
SearchTerm = request.Search,
|
||||
ImdbID = request.Imdbid,
|
||||
QueryType = "TorrentPotato"
|
||||
QueryType = "movie"
|
||||
};
|
||||
torznabQuery.ExpandCatsToSubCats();
|
||||
|
||||
|
|
Loading…
Reference in New Issue