mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
UI: fix category order
This commit is contained in:
@@ -38,7 +38,11 @@ namespace Jackett.Models.DTO
|
|||||||
|
|
||||||
alternativesitelinks = indexer.AlternativeSiteLinks;
|
alternativesitelinks = indexer.AlternativeSiteLinks;
|
||||||
|
|
||||||
caps = indexer.TorznabCaps.Categories.Select(c => new Capability
|
caps = indexer.TorznabCaps.Categories
|
||||||
|
.GroupBy(p => p.ID)
|
||||||
|
.Select(g => g.First())
|
||||||
|
.OrderBy(c => c.ID < 100000 ? "z" + c.ID.ToString() : c.Name)
|
||||||
|
.Select(c => new Capability
|
||||||
{
|
{
|
||||||
ID = c.ID.ToString(),
|
ID = c.ID.ToString(),
|
||||||
Name = c.Name
|
Name = c.Name
|
||||||
|
@@ -96,16 +96,6 @@ namespace Jackett.Models
|
|||||||
return supportsCategory;
|
return supportsCategory;
|
||||||
}
|
}
|
||||||
|
|
||||||
public JArray CapsToJson()
|
|
||||||
{
|
|
||||||
var jArray = new JArray();
|
|
||||||
foreach (var cat in Categories.GroupBy(p => p.ID).Select(g => g.First()).OrderBy(c => c.ID < 100000 ? "z" + c.ID.ToString() : c.Name))
|
|
||||||
{
|
|
||||||
jArray.Add(cat.ToJson());
|
|
||||||
}
|
|
||||||
return jArray;
|
|
||||||
}
|
|
||||||
|
|
||||||
public string ToXml()
|
public string ToXml()
|
||||||
{
|
{
|
||||||
var xdoc = new XDocument(
|
var xdoc = new XDocument(
|
||||||
|
Reference in New Issue
Block a user