XSpeeds: dump feed in case of error (#742)

This commit is contained in:
kaso17 2016-11-26 16:57:49 +01:00 committed by GitHub
parent ab083cdec8
commit 80fd717970
1 changed files with 46 additions and 35 deletions

View File

@ -172,7 +172,10 @@ namespace Jackett.Indexers
// If we have no query use the RSS Page as their server is slow enough at times! // If we have no query use the RSS Page as their server is slow enough at times!
if (string.IsNullOrWhiteSpace(searchString)) if (string.IsNullOrWhiteSpace(searchString))
{ {
var rssPage = await RequestStringWithCookiesAndRetry(string.Format(RSSUrl, configData.RSSKey.Value)); var rssPage = await RequestStringWithCookiesAndRetry(string.Format(RSSUrl, configData.RSSKey.Value));
try
{
if (rssPage.Content.EndsWith("\0")) { if (rssPage.Content.EndsWith("\0")) {
rssPage.Content = rssPage.Content.Substring(0, rssPage.Content.Length - 1); rssPage.Content = rssPage.Content.Substring(0, rssPage.Content.Length - 1);
} }
@ -214,6 +217,14 @@ namespace Jackett.Indexers
releases.Add(release); releases.Add(release);
} }
} }
catch (Exception ex)
{
logger.Error("XSpeeds: Error while parsing the RSS feed:");
logger.Error(rssPage.Content);
throw ex;
}
}
else else
{ {
if (searchString.Length < 3) if (searchString.Length < 3)