mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-23 22:25:09 -04:00
Improved error message when nzb download contains an newznab error instead
Signed-off-by: Robin Dadswell <robin@dadswell.email>
This commit is contained in:
@@ -11,5 +11,21 @@ namespace NzbDrone.Common.Extensions
|
||||
{
|
||||
return container.Descendants().Where(c => c.Name.LocalName.Equals(localName, StringComparison.InvariantCultureIgnoreCase));
|
||||
}
|
||||
|
||||
public static bool TryGetAttributeValue(this XElement element, string name, out string value)
|
||||
{
|
||||
var attr = element.Attribute(name);
|
||||
|
||||
if (attr != null)
|
||||
{
|
||||
value = attr.Value;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
value = null;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user