Fixed: Misleading error message when Kickass/Torrent Rss indexer returned invalid xml.
fixes #1058
This commit is contained in:
parent
2f50074123
commit
bbfe8c27c6
|
@ -19,16 +19,13 @@ namespace NzbDrone.Core.Indexers
|
|||
|
||||
protected override bool PreProcess(IndexerResponse indexerResponse)
|
||||
{
|
||||
using (var xmlTextReader = XmlReader.Create(new StringReader(indexerResponse.Content), new XmlReaderSettings { DtdProcessing = DtdProcessing.Ignore, IgnoreComments = true }))
|
||||
{
|
||||
var document = XDocument.Load(xmlTextReader);
|
||||
var document = LoadXmlDocument(indexerResponse);
|
||||
var items = GetItems(document).ToList();
|
||||
|
||||
if (items.Count == 1 && GetTitle(items.First()).Equals("No items exist - Try again later"))
|
||||
{
|
||||
throw new IndexerException(indexerResponse, "No results were found");
|
||||
}
|
||||
}
|
||||
|
||||
return base.PreProcess(indexerResponse);
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace NzbDrone.Core.Indexers.Omgwtfnzbs
|
|||
|
||||
protected override bool PreProcess(IndexerResponse indexerResponse)
|
||||
{
|
||||
var xdoc = XDocument.Parse(indexerResponse.Content);
|
||||
var xdoc = LoadXmlDocument(indexerResponse);
|
||||
var notice = xdoc.Descendants("notice").FirstOrDefault();
|
||||
|
||||
if (notice == null) return true;
|
||||
|
|
Loading…
Reference in New Issue