Cardigann Categories

This commit is contained in:
Qstick
2020-11-16 14:24:56 -05:00
parent 5b22093c29
commit 529102ebcf
10 changed files with 576 additions and 52 deletions
@@ -110,17 +110,9 @@ namespace NzbDrone.Core.Indexers.Newznab
failures.AddIfNotNull(TestCapabilities());
}
protected static List<int> CategoryIds(List<IndexerCategory> categories)
protected static List<int> CategoryIds(IndexerCapabilitiesCategories categories)
{
var l = categories.Select(c => c.Id).ToList();
foreach (var category in categories)
{
if (category.SubCategories != null)
{
l.AddRange(CategoryIds(category.SubCategories));
}
}
var l = categories.GetTorznabCategoryTree().Select(c => c.Id).ToList();
return l;
}