mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-21 05:43:19 -07:00
#164 has been resolved
This commit is contained in:
parent
8cce80654b
commit
5a6863456f
22 changed files with 663 additions and 8 deletions
|
@ -83,6 +83,7 @@ namespace PlexRequests.UI
|
|||
container.Register<ISettingsService<PushoverNotificationSettings>, SettingsServiceV2<PushoverNotificationSettings>>();
|
||||
container.Register<ISettingsService<HeadphonesSettings>, SettingsServiceV2<HeadphonesSettings>>();
|
||||
container.Register<ISettingsService<LogSettings>, SettingsServiceV2<LogSettings>>();
|
||||
container.Register<ISettingsService<SlackNotificationSettings>, SettingsServiceV2<SlackNotificationSettings>>();
|
||||
|
||||
// Repo's
|
||||
container.Register<IRepository<LogEntity>, GenericRepository<LogEntity>>();
|
||||
|
@ -108,6 +109,7 @@ namespace PlexRequests.UI
|
|||
container.Register<IPlexApi, PlexApi>();
|
||||
container.Register<IMusicBrainzApi, MusicBrainzApi>();
|
||||
container.Register<IHeadphonesApi, HeadphonesApi>();
|
||||
container.Register<ISlackApi, SlackApi>();
|
||||
|
||||
// NotificationService
|
||||
container.Register<INotificationService, NotificationService>().AsSingleton();
|
||||
|
@ -193,6 +195,13 @@ namespace PlexRequests.UI
|
|||
{
|
||||
notificationService.Subscribe(new PushoverNotification(container.Resolve<IPushoverApi>(), pushoverService));
|
||||
}
|
||||
|
||||
var slackService = container.Resolve<ISettingsService<SlackNotificationSettings>>();
|
||||
var slackSettings = slackService.GetSettings();
|
||||
if (slackSettings.Enabled)
|
||||
{
|
||||
notificationService.Subscribe(new SlackNotification(container.Resolve<ISlackApi>(), slackService));
|
||||
}
|
||||
}
|
||||
|
||||
protected override void RequestStartup(TinyIoCContainer container, IPipelines pipelines, NancyContext context)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue