mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
Added ExternalNotificationProviderBase based on IndexProviderBase.
This commit is contained in:
parent
671dcd074c
commit
a36d5fae2f
16 changed files with 336 additions and 97 deletions
|
@ -9,6 +9,7 @@ using NLog;
|
|||
using NzbDrone.Core.Instrumentation;
|
||||
using NzbDrone.Core.Providers;
|
||||
using NzbDrone.Core.Providers.Core;
|
||||
using NzbDrone.Core.Providers.ExternalNotification;
|
||||
using NzbDrone.Core.Providers.Indexer;
|
||||
using NzbDrone.Core.Providers.Jobs;
|
||||
using NzbDrone.Core.Repository;
|
||||
|
@ -112,11 +113,10 @@ namespace NzbDrone.Core
|
|||
|
||||
BindIndexers();
|
||||
BindJobs();
|
||||
BindExternalNotifications();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private static void BindIndexers()
|
||||
{
|
||||
_kernel.Bind<IndexerProviderBase>().To<NzbsOrgProvider>().InSingletonScope();
|
||||
|
@ -138,6 +138,12 @@ namespace NzbDrone.Core
|
|||
_kernel.Get<WebTimer>().StartTimer(30);
|
||||
}
|
||||
|
||||
private static void BindExternalNotifications()
|
||||
{
|
||||
_kernel.Bind<ExternalNotificationProviderBase>().To<XbmcNotificationProvider>().InSingletonScope();
|
||||
var notifiers = _kernel.GetAll<ExternalNotificationProviderBase>();
|
||||
_kernel.Get<ExternalNotificationProvider>().InitializeNotifiers(notifiers.ToList());
|
||||
}
|
||||
|
||||
private static void ForceMigration(IRepository repository)
|
||||
{
|
||||
|
@ -232,7 +238,5 @@ namespace NzbDrone.Core
|
|||
repository.Update(hd);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue