Newznab Work

This commit is contained in:
Qstick
2020-11-20 02:42:36 -05:00
parent 8e72c7153d
commit b586b6ac1c
26 changed files with 325 additions and 160 deletions
@@ -206,12 +206,15 @@ namespace NzbDrone.Core.Indexers.Newznab
foreach (var xmlSubcat in xmlCategory.Elements("subcat"))
{
cat.SubCategories.Add(new IndexerCategory
var subCat = new IndexerCategory
{
Id = int.Parse(xmlSubcat.Attribute("id").Value),
Name = xmlSubcat.Attribute("name").Value,
Description = xmlSubcat.Attribute("description") != null ? xmlSubcat.Attribute("description").Value : string.Empty
});
};
cat.SubCategories.Add(subCat);
capabilities.Categories.AddCategoryMapping(subCat.Name, subCat);
}
capabilities.Categories.AddCategoryMapping(cat.Name, cat);