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

View File

@@ -194,17 +194,17 @@ namespace NzbDrone.Core.Indexers.Cardigann
var cats = MapTrackerCatToNewznab(value);
if (cats.Any())
{
if (release.Category == null || fieldModifiers.Contains("noappend"))
if (release.Categories == null || fieldModifiers.Contains("noappend"))
{
release.Category = cats;
release.Categories = cats;
}
else
{
release.Category = release.Category.Union(cats).ToList();
release.Categories = release.Categories.Union(cats).ToList();
}
}
value = release.Category.ToString();
value = release.Categories.ToString();
break;
case "size":
release.Size = ReleaseInfo.GetBytes(value);