Fixed: (Cardigann) Don't die if no categories can be mapped for a release

Fixes #105
This commit is contained in:
Qstick
2021-06-12 02:17:17 -04:00
parent bcee5f1754
commit 9675171aff
31 changed files with 41 additions and 40 deletions
@@ -104,12 +104,12 @@ namespace NzbDrone.Core.Indexers.BroadcastheNet
torrentInfo.DownloadVolumeFactor = 0;
torrentInfo.MinimumRatio = 1;
torrentInfo.Category = _categories.MapTrackerCatToNewznab(torrent.Resolution);
torrentInfo.Categories = _categories.MapTrackerCatToNewznab(torrent.Resolution);
// Default to TV if category could not be mapped
if (torrentInfo.Category == null || !torrentInfo.Category.Any())
if (torrentInfo.Categories == null || !torrentInfo.Categories.Any())
{
torrentInfo.Category = new List<IndexerCategory> { NewznabStandardCategory.TV };
torrentInfo.Categories = new List<IndexerCategory> { NewznabStandardCategory.TV };
}
results.Add(torrentInfo);