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

@@ -37,7 +37,7 @@ namespace Jackett.Controllers
{
var indexer = indexerService.GetIndexer(indexerID);
var torznabQuery = TorznabQuery.FromHttpQuery(HttpUtility.ParseQueryString(Request.RequestUri.Query));
if (string.Equals(torznabQuery.QueryType, "caps", StringComparison.InvariantCultureIgnoreCase))
{
return new HttpResponseMessage()
@@ -46,6 +46,7 @@ namespace Jackett.Controllers
};
}
torznabQuery.ExpandCatsToSubCats();
var allowBadApiDueToDebug = false;
#if DEBUG
allowBadApiDueToDebug = Debugger.IsAttached;
@@ -77,7 +78,6 @@ namespace Jackett.Controllers
var filteredReleases = releases = indexer.FilterResults(torznabQuery, releases);
int? newItemCount = null;
// Cache non query results
if (string.IsNullOrEmpty(torznabQuery.SanitizedSearchTerm))
{
@@ -95,7 +95,7 @@ namespace Jackett.Controllers
}
if (!string.IsNullOrWhiteSpace(torznabQuery.SanitizedSearchTerm)) {
logBuilder.AppendFormat(" for: {0} {1}", torznabQuery.SanitizedSearchTerm, torznabQuery.GetEpisodeSearchString());
logBuilder.AppendFormat(" for: {0}", torznabQuery.GetQueryString());
}
logger.Info(logBuilder.ToString());