mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-12 16:22:55 -07:00
Added Pushbullet notifications #8
This commit is contained in:
parent
b9a886d5dc
commit
f046c5d39b
20 changed files with 534 additions and 61 deletions
|
@ -73,6 +73,7 @@ namespace PlexRequests.UI
|
|||
container.Register<ISettingsService<PlexSettings>, SettingsServiceV2<PlexSettings>>();
|
||||
container.Register<ISettingsService<SonarrSettings>, SettingsServiceV2<SonarrSettings>>();
|
||||
container.Register<ISettingsService<EmailNotificationSettings>, SettingsServiceV2<EmailNotificationSettings>>();
|
||||
container.Register<ISettingsService<PushbulletNotificationSettings>, SettingsServiceV2<PushbulletNotificationSettings>>();
|
||||
container.Register<IRepository<RequestedModel>, GenericRepository<RequestedModel>>();
|
||||
container.Register<IRequestService, RequestService>();
|
||||
|
||||
|
@ -81,6 +82,7 @@ namespace PlexRequests.UI
|
|||
container.Register<IIntervals, UpdateInterval>();
|
||||
|
||||
container.Register<ICouchPotatoApi, CouchPotatoApi>();
|
||||
container.Register<IPushbulletApi, PushbulletApi>();
|
||||
|
||||
container.Register<ISonarrApi, SonarrApi>();
|
||||
//container.Register<ISonarrApi, MockSonarrApi>();
|
||||
|
@ -125,6 +127,13 @@ namespace PlexRequests.UI
|
|||
{
|
||||
NotificationService.Subscribe(new EmailMessageNotification(emailSettingsService));
|
||||
}
|
||||
|
||||
var pushbulletService = container.Resolve<ISettingsService<PushbulletNotificationSettings>>();
|
||||
var pushbulletSettings = pushbulletService.GetSettings();
|
||||
if (pushbulletSettings.Enabled)
|
||||
{
|
||||
NotificationService.Subscribe(new PushbulletNotification(container.Resolve<IPushbulletApi>(), container.Resolve<ISettingsService<PushbulletNotificationSettings>>()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue