Metasearch , fix for empty queries being converted to a single space, parent categories are now autoexpanded.

This commit is contained in:
KZ
2015-08-14 22:20:51 +01:00
parent c45929fe43
commit 98446222c9
39 changed files with 465 additions and 119 deletions

View File

@@ -28,7 +28,19 @@ namespace Jackett.Controllers
private ICacheService cacheService;
private IWebClient webClient;
public static readonly int[] MOVIE_CATS = new int[] {2000, 2040, 2030, 2010};
public static int[] MOVIE_CATS
{
get
{
var torznabQuery = new TorznabQuery()
{
Categories = new int[1] { TorznabCatType.Movies.ID },
};
torznabQuery.ExpandCatsToSubCats();
return torznabQuery.Categories;
}
}
public PotatoController(IIndexerManagerService i, Logger l, IServerService s, ICacheService c, IWebClient w)
{
@@ -137,7 +149,7 @@ namespace Jackett.Controllers
}
else
{
logger.Info(string.Format("Found {0} torrentpotato releases from {1} for: {2} {3}", releases.Count(), indexer.DisplayName, torznabQuery.SanitizedSearchTerm, torznabQuery.GetEpisodeSearchString()));
logger.Info(string.Format("Found {0} torrentpotato releases from {1} for: {2}", releases.Count(), indexer.DisplayName, torznabQuery.GetQueryString()));
}
// Force the return as Json