mirror of https://github.com/Jackett/Jackett
XSpeeds: dump feed in case of error (#742)
This commit is contained in:
parent
ab083cdec8
commit
80fd717970
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue