mirror of
https://github.com/Jackett/Jackett
synced 2025-02-24 15:21:06 +00:00
add configured option for t=indexers
This commit is contained in:
parent
48279699eb
commit
280547ad01
2 changed files with 7 additions and 1 deletions
|
@ -21,6 +21,7 @@ namespace Jackett.Common.Models.DTO
|
|||
public string track { get; set; }
|
||||
public string year { get; set; }
|
||||
public string genre { get; set; }
|
||||
public string configured { get; set; }
|
||||
|
||||
public static TorznabQuery ToTorznabQuery(TorznabRequest request)
|
||||
{
|
||||
|
|
|
@ -258,11 +258,16 @@ namespace Jackett.Controllers
|
|||
return GetErrorXML(203, "Function Not Available: this isn't a meta indexer");
|
||||
}
|
||||
var CurrentBaseMetaIndexer = (BaseMetaIndexer)CurrentIndexer;
|
||||
var indexers = CurrentBaseMetaIndexer.Indexers;
|
||||
if (string.Equals(request.configured, "true", StringComparison.InvariantCultureIgnoreCase))
|
||||
indexers = indexers.Where(i => i.IsConfigured);
|
||||
else if (string.Equals(request.configured, "false", StringComparison.InvariantCultureIgnoreCase))
|
||||
indexers = indexers.Where(i => !i.IsConfigured);
|
||||
|
||||
var xdoc = new XDocument(
|
||||
new XDeclaration("1.0", "UTF-8", null),
|
||||
new XElement("indexers",
|
||||
from i in CurrentBaseMetaIndexer.Indexers
|
||||
from i in indexers
|
||||
select new XElement("indexer",
|
||||
new XAttribute("id", i.ID),
|
||||
new XAttribute("configured", i.IsConfigured),
|
||||
|
|
Loading…
Reference in a new issue