torznab caps: add support for limits

This commit is contained in:
kaso17 2017-08-17 09:48:54 +02:00
parent f963f8d173
commit aa157cfcb9
1 changed files with 8 additions and 0 deletions

View File

@ -10,6 +10,8 @@ namespace Jackett.Models
{
public class TorznabCapabilities
{
public int? LimitsMax { get; set; } = null;
public int? LimitsDefault { get; set; } = null;
public bool SearchAvailable { get; set; }
@ -92,6 +94,12 @@ namespace Jackett.Models
new XElement("server",
new XAttribute("title", "Jackett")
),
LimitsMax != null || LimitsDefault != null ?
new XElement("limits",
LimitsMax != null ? new XAttribute("max", LimitsMax) : null,
LimitsDefault != null ? new XAttribute("default", LimitsDefault) : null
)
: null,
new XElement("searching",
new XElement("search",
new XAttribute("available", SearchAvailable ? "yes" : "no"),