Fix testing indexers

This commit is contained in:
KZ 2015-07-29 21:11:30 +01:00
parent 95402f3d4f
commit c76137a70c
2 changed files with 12 additions and 4 deletions

View File

@ -24,6 +24,11 @@ namespace Jackett.Models
public string SearchTerm { get; set; }
public string SanitizedSearchTerm { get; set; }
public TorznabQuery()
{
Categories = new int[0];
}
public string GetEpisodeSearchString()
{
if (Season == 0)

View File

@ -13,10 +13,13 @@ namespace Jackett
{
public async Task LogAsync(ExceptionLoggerContext context, CancellationToken cancellationToken)
{
Engine.Logger.Error("Unhandled exception: " + context.Exception.GetExceptionDetails());
var request = await context.Request.Content.ReadAsStringAsync();
Engine.Logger.Error("Unhandled exception url: " + context.Request.RequestUri);
Engine.Logger.Error("Unhandled exception request body: " + request);
// OWIN seems to give lots of these exceptions but we are not interested in them.
if (context.Exception.Message != "Error while copying content to a stream.")
{
Engine.Logger.Error("Unhandled exception: " + context.Exception.GetExceptionDetails());
var request = await context.Request.Content.ReadAsStringAsync();
Engine.Logger.Error("Unhandled exception url: " + context.Request.RequestUri);
}
}
}
}