mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Remove Indexers from App when Removed in Prowlarr
This commit is contained in:
@@ -47,8 +47,16 @@ namespace NzbDrone.Core.Applications.Sonarr
|
||||
|
||||
public override void RemoveIndexer(int indexerId)
|
||||
{
|
||||
//Use the Id mapping here to delete the correct indexer
|
||||
throw new System.NotImplementedException();
|
||||
var appMappings = _appIndexerMapService.GetMappingsForApp(Definition.Id);
|
||||
|
||||
var indexerMapping = appMappings.FirstOrDefault(m => m.IndexerId == indexerId);
|
||||
|
||||
if (indexerMapping != null)
|
||||
{
|
||||
//Remove Indexer remotely and then remove the mapping
|
||||
_sonarrV3Proxy.RemoveIndexer(indexerMapping.RemoteIndexerId, Settings);
|
||||
_appIndexerMapService.Delete(indexerMapping.Id);
|
||||
}
|
||||
}
|
||||
|
||||
public override void UpdateIndexer(IndexerDefinition indexer)
|
||||
|
Reference in New Issue
Block a user