Show indexer privacy in search results

pull/1672/head
Bogdan 1 year ago
parent ef0f8e25fd
commit 119164f729

@ -76,8 +76,12 @@ namespace NzbDrone.Core.IndexerSearch
select new XElement("item",
new XElement("title", RemoveInvalidXMLChars(r.Title)),
new XElement("description", RemoveInvalidXMLChars(r.Description)),
new XElement("guid", r.Guid), // GUID and (Link or Magnet) are mandatory
new XElement("prowlarrindexer", new XAttribute("id", r.IndexerId), r.Indexer),
new XElement("guid", r.Guid), // GUID and (Link or Magnet) are mandatory
new XElement(
"prowlarrindexer",
new XAttribute("id", r.IndexerId),
new XAttribute("type", r.IndexerPrivacy switch { IndexerPrivacy.Private => "private", IndexerPrivacy.Public => "public", _ => "semi-private" }),
r.Indexer),
r.InfoUrl == null ? null : new XElement("comments", r.InfoUrl),
r.PublishDate == DateTime.MinValue ? new XElement("pubDate", XmlDateFormat(DateTime.Now)) : new XElement("pubDate", XmlDateFormat(r.PublishDate)),
new XElement("size", r.Size),

@ -128,6 +128,7 @@ namespace NzbDrone.Core.Indexers
c.IndexerId = Definition.Id;
c.Indexer = Definition.Name;
c.DownloadProtocol = Protocol;
c.IndexerPrivacy = ((IndexerDefinition)Definition).Privacy;
c.IndexerPriority = ((IndexerDefinition)Definition).Priority;
if (Protocol == DownloadProtocol.Torrent)

@ -25,6 +25,7 @@ namespace NzbDrone.Core.Parser.Model
public int IndexerId { get; set; }
public string Indexer { get; set; }
public int IndexerPriority { get; set; }
public IndexerPrivacy IndexerPrivacy { get; set; }
public DownloadProtocol DownloadProtocol { get; set; }
public int? Grabs { get; set; }
public int? Files { get; set; }

Loading…
Cancel
Save