mirror of
https://github.com/Prowlarr/Prowlarr
synced 2025-12-20 23:42:46 +01:00
Fixed: Don't wipe categories when updating Newznab Indexer
This commit is contained in:
parent
79d2238652
commit
e82875f964
1 changed files with 13 additions and 0 deletions
|
|
@ -256,5 +256,18 @@ public override IndexerDefinition Create(IndexerDefinition definition)
|
|||
|
||||
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…
Reference in a new issue