Fixed: Don't wipe categories when updating Newznab Indexer

pull/6/head
Qstick 4 years ago
parent 79d2238652
commit e82875f964

@ -256,5 +256,18 @@ namespace NzbDrone.Core.Indexers
return base.Create(definition);
}
public override void Update(IndexerDefinition definition)
{
var provider = _providers.First(v => v.GetType().Name == definition.Implementation);
if (definition.Implementation == typeof(Newznab.Newznab).Name)
{
var settings = (NewznabSettings)definition.Settings;
settings.Categories = _newznabCapabilitiesProvider.GetCapabilities(settings)?.Categories.GetTorznabCategoryList() ?? null;
}
base.Update(definition);
}
}
}

Loading…
Cancel
Save