|
|
@ -19,16 +19,13 @@ namespace NzbDrone.Core.Indexers
|
|
|
|
|
|
|
|
|
|
|
|
protected override bool PreProcess(IndexerResponse indexerResponse)
|
|
|
|
protected override bool PreProcess(IndexerResponse indexerResponse)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
using (var xmlTextReader = XmlReader.Create(new StringReader(indexerResponse.Content), new XmlReaderSettings { DtdProcessing = DtdProcessing.Ignore, IgnoreComments = true }))
|
|
|
|
var document = LoadXmlDocument(indexerResponse);
|
|
|
|
{
|
|
|
|
|
|
|
|
var document = XDocument.Load(xmlTextReader);
|
|
|
|
|
|
|
|
var items = GetItems(document).ToList();
|
|
|
|
var items = GetItems(document).ToList();
|
|
|
|
|
|
|
|
|
|
|
|
if (items.Count == 1 && GetTitle(items.First()).Equals("No items exist - Try again later"))
|
|
|
|
if (items.Count == 1 && GetTitle(items.First()).Equals("No items exist - Try again later"))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
throw new IndexerException(indexerResponse, "No results were found");
|
|
|
|
throw new IndexerException(indexerResponse, "No results were found");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return base.PreProcess(indexerResponse);
|
|
|
|
return base.PreProcess(indexerResponse);
|
|
|
|
}
|
|
|
|
}
|
|
|
|