mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-20 21:54:25 -04:00
Now checking for errors before parsing newznab feeds
This commit is contained in:
@@ -29,6 +29,8 @@ namespace NzbDrone.Core.Indexers
|
||||
|
||||
public IEnumerable<ReleaseInfo> Process(string xml, string url)
|
||||
{
|
||||
PreProcess(xml, url);
|
||||
|
||||
using (var xmlTextReader = XmlReader.Create(new StringReader(xml), new XmlReaderSettings { ProhibitDtd = false, IgnoreComments = true }))
|
||||
{
|
||||
|
||||
@@ -103,6 +105,10 @@ namespace NzbDrone.Core.Indexers
|
||||
|
||||
protected abstract long GetSize(XElement item);
|
||||
|
||||
protected virtual void PreProcess(string source, string url)
|
||||
{
|
||||
}
|
||||
|
||||
protected virtual ReleaseInfo PostProcessor(XElement item, ReleaseInfo currentResult)
|
||||
{
|
||||
return currentResult;
|
||||
|
||||
Reference in New Issue
Block a user