Log parsing errors for rarbg

This commit is contained in:
zone117x 2015-05-25 17:53:43 -06:00
parent 0311c3f9a9
commit 976f42b48c
1 changed files with 21 additions and 15 deletions

View File

@ -119,6 +119,7 @@ namespace Jackett.Indexers
async Task<ReleaseInfo[]> PerformQuery(TorznabQuery query, string baseUrl) async Task<ReleaseInfo[]> PerformQuery(TorznabQuery query, string baseUrl)
{ {
List<ReleaseInfo> releases = new List<ReleaseInfo>(); List<ReleaseInfo> releases = new List<ReleaseInfo>();
string token = await GetToken(baseUrl); string token = await GetToken(baseUrl);
@ -131,7 +132,8 @@ namespace Jackett.Indexers
var request = CreateHttpRequest(searchUrl); var request = CreateHttpRequest(searchUrl);
var response = await client.SendAsync(request); var response = await client.SendAsync(request);
var results = await response.Content.ReadAsStringAsync(); var results = await response.Content.ReadAsStringAsync();
try
{
var jItems = JArray.Parse(results); var jItems = JArray.Parse(results);
foreach (JObject item in jItems) foreach (JObject item in jItems)
{ {
@ -147,7 +149,11 @@ namespace Jackett.Indexers
release.MinimumSeedTime = 172800; release.MinimumSeedTime = 172800;
releases.Add(release); releases.Add(release);
} }
}
catch (Exception ex)
{
OnResultParsingError(this, results, ex);
}
return releases.ToArray(); return releases.ToArray();
} }