|
|
@ -139,11 +139,14 @@ namespace NzbDrone.Core.Indexers.Newznab
|
|
|
|
|
|
|
|
|
|
|
|
protected string TryGetNewznabAttribute(XElement item, string key, string defaultValue = "")
|
|
|
|
protected string TryGetNewznabAttribute(XElement item, string key, string defaultValue = "")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var attr = item.Elements(ns + "attr").FirstOrDefault(e => e.Attribute("name").Value.Equals(key, StringComparison.CurrentCultureIgnoreCase));
|
|
|
|
var attrElement = item.Elements(ns + "attr").FirstOrDefault(e => e.Attribute("name").Value.Equals(key, StringComparison.OrdinalIgnoreCase));
|
|
|
|
|
|
|
|
if (attrElement != null)
|
|
|
|
if (attr != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return attr.Attribute("value").Value;
|
|
|
|
var attrValue = attrElement.Attribute("value");
|
|
|
|
|
|
|
|
if (attrValue != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return attrValue.Value;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return defaultValue;
|
|
|
|
return defaultValue;
|
|
|
|