mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-22 22:34:53 -04:00
Misc History Improvements
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using NzbDrone.Core.Indexers;
|
||||
using NzbDrone.Core.Messaging.Events;
|
||||
using NzbDrone.Core.ThingiProvider.Events;
|
||||
|
||||
namespace NzbDrone.Core.Applications
|
||||
{
|
||||
@@ -10,7 +14,7 @@ namespace NzbDrone.Core.Applications
|
||||
void DeleteAllForApp(int appId);
|
||||
}
|
||||
|
||||
public class AppIndexerMapService : IAppIndexerMapService
|
||||
public class AppIndexerMapService : IAppIndexerMapService, IHandle<ProviderDeletedEvent<IApplication>>
|
||||
{
|
||||
private readonly IAppIndexerMapRepository _appIndexerMapRepository;
|
||||
|
||||
@@ -33,5 +37,10 @@ namespace NzbDrone.Core.Applications
|
||||
{
|
||||
return _appIndexerMapRepository.Insert(appIndexerMap);
|
||||
}
|
||||
|
||||
public void Handle(ProviderDeletedEvent<IApplication> message)
|
||||
{
|
||||
_appIndexerMapRepository.DeleteAllForApp(message.ProviderId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user