omgwtfnzbs fixes
New: connect to omgwtfnzbs over https Fixed: No results found response for omgwtfnzbs
This commit is contained in:
parent
e3efd9a84c
commit
97370cc8b3
|
@ -8,7 +8,7 @@ namespace NzbDrone.Core.IndexerSearch.Definitions
|
|||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("[{0} : {1}", Series.Title, AirDate);
|
||||
return string.Format("[{0} : {1:yyyy-MM-dd}", Series.Title, AirDate);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,8 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using FluentValidation.Results;
|
||||
using NLog;
|
||||
using NLog;
|
||||
using NzbDrone.Common.Http;
|
||||
using NzbDrone.Core.Configuration;
|
||||
using NzbDrone.Core.Parser;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using NzbDrone.Common;
|
||||
using NzbDrone.Common.Http;
|
||||
|
@ -15,7 +14,7 @@ namespace NzbDrone.Core.Indexers.Omgwtfnzbs
|
|||
|
||||
public OmgwtfnzbsRequestGenerator()
|
||||
{
|
||||
BaseUrl = "http://rss.omgwtfnzbs.org/rss-search.php";
|
||||
BaseUrl = "https://rss.omgwtfnzbs.org/rss-search.php";
|
||||
}
|
||||
|
||||
public virtual IList<IEnumerable<IndexerRequest>> GetRecentRequests()
|
||||
|
|
|
@ -3,7 +3,6 @@ using System.Collections.Generic;
|
|||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Xml;
|
||||
using System.Xml.Linq;
|
||||
|
@ -46,7 +45,7 @@ namespace NzbDrone.Core.Indexers
|
|||
using (var xmlTextReader = XmlReader.Create(new StringReader(indexerResponse.Content), new XmlReaderSettings { DtdProcessing = DtdProcessing.Ignore, IgnoreComments = true }))
|
||||
{
|
||||
var document = XDocument.Load(xmlTextReader);
|
||||
var items = document.Root.Element("channel").Elements("item");
|
||||
var items = GetItems(document);
|
||||
|
||||
foreach (var item in items)
|
||||
{
|
||||
|
@ -231,5 +230,24 @@ namespace NzbDrone.Core.Indexers
|
|||
|
||||
return Convert.ToInt64(result);
|
||||
}
|
||||
|
||||
private IEnumerable<XElement> GetItems(XDocument document)
|
||||
{
|
||||
var root = document.Root;
|
||||
|
||||
if (root == null)
|
||||
{
|
||||
return Enumerable.Empty<XElement>();
|
||||
}
|
||||
|
||||
var channel = root.Element("channel");
|
||||
|
||||
if (channel == null)
|
||||
{
|
||||
return Enumerable.Empty<XElement>();
|
||||
}
|
||||
|
||||
return channel.Elements("item");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue