mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
Fixed: Newznab should reject a Torznab feed.
This commit is contained in:
parent
c1298d162e
commit
e945231ab3
1 changed files with 11 additions and 0 deletions
|
@ -50,6 +50,17 @@ namespace NzbDrone.Core.Indexers.Newznab
|
|||
return releaseInfo;
|
||||
}
|
||||
|
||||
protected override ReleaseInfo PostProcess(XElement item, ReleaseInfo releaseInfo)
|
||||
{
|
||||
var enclosureType = item.Element("enclosure").Attribute("type").Value;
|
||||
if (enclosureType.Contains("application/x-bittorrent"))
|
||||
{
|
||||
throw new UnsupportedFeedException("Feed contains {0}, did you intend to add a Torznab indexer?", enclosureType);
|
||||
}
|
||||
|
||||
return base.PostProcess(item, releaseInfo);
|
||||
}
|
||||
|
||||
protected override string GetInfoUrl(XElement item)
|
||||
{
|
||||
return ParseUrl(item.TryGetValue("comments").TrimEnd("#comments"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue