You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
886 B
27 lines
886 B
6 years ago
|
using NzbDrone.Core.Messaging.Commands;
|
||
|
using NzbDrone.Core.Messaging.Events;
|
||
|
using NzbDrone.Core.ThingiProvider.Events;
|
||
|
|
||
|
namespace NzbDrone.Core.ImportLists
|
||
|
{
|
||
|
public class ImportListUpdatedHandler : IHandle<ProviderUpdatedEvent<IImportList>>, IHandle<ProviderAddedEvent<IImportList>>
|
||
|
{
|
||
|
private readonly IManageCommandQueue _commandQueueManager;
|
||
|
|
||
|
public ImportListUpdatedHandler(IManageCommandQueue commandQueueManager)
|
||
|
{
|
||
|
_commandQueueManager = commandQueueManager;
|
||
|
}
|
||
|
|
||
|
public void Handle(ProviderUpdatedEvent<IImportList> message)
|
||
|
{
|
||
|
_commandQueueManager.Push(new ImportListSyncCommand(message.Definition.Id));
|
||
|
}
|
||
|
|
||
|
public void Handle(ProviderAddedEvent<IImportList> message)
|
||
|
{
|
||
|
_commandQueueManager.Push(new ImportListSyncCommand(message.Definition.Id));
|
||
|
}
|
||
|
}
|
||
|
}
|