mirror of
https://github.com/Prowlarr/Prowlarr
synced 2025-12-25 18:06:21 +01:00
Show indexer privacy in search results
This commit is contained in:
parent
ef0f8e25fd
commit
119164f729
3 changed files with 8 additions and 2 deletions
|
|
@ -76,8 +76,12 @@ from r in Releases
|
|||
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 @@ protected virtual IList<ReleaseInfo> CleanupReleases(IEnumerable<ReleaseInfo> re
|
|||
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 @@ public ReleaseInfo()
|
|||
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…
Reference in a new issue