Fixed: Category parsing for some not-so-great Torznab feeds

MoreThanTv
This commit is contained in:
Qstick
2022-12-20 20:50:30 -06:00
parent 30f53c20ed
commit ad95d73e9d
4 changed files with 105 additions and 2 deletions
@@ -127,6 +127,12 @@ namespace NzbDrone.Core.Indexers.Newznab
var cats = TryGetMultipleNewznabAttributes(item, "category");
var results = new List<IndexerCategory>();
// Try to find <category> elements for some indexers that suck at following the rules.
if (results.Count == 0)
{
cats = item.Elements("category").Select(e => e.Value).ToList();
}
foreach (var cat in cats)
{
var indexerCat = capabilities.Categories.MapTrackerCatToNewznab(cat);