|
|
|
@ -356,8 +356,15 @@ namespace PlexRequests.UI.Modules
|
|
|
|
|
Log.Trace(settings.DumpJson());
|
|
|
|
|
|
|
|
|
|
var result = EmailService.SaveSettings(settings);
|
|
|
|
|
|
|
|
|
|
NotificationService.Subscribe(new EmailMessageNotification(EmailService));
|
|
|
|
|
|
|
|
|
|
if (settings.Enabled)
|
|
|
|
|
{
|
|
|
|
|
NotificationService.Subscribe(new EmailMessageNotification(EmailService));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
NotificationService.UnSubscribe(new EmailMessageNotification(EmailService));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Log.Info("Saved email settings, result: {0}", result);
|
|
|
|
|
return Response.AsJson(result
|
|
|
|
@ -389,8 +396,14 @@ namespace PlexRequests.UI.Modules
|
|
|
|
|
Log.Trace(settings.DumpJson());
|
|
|
|
|
|
|
|
|
|
var result = PushbulletService.SaveSettings(settings);
|
|
|
|
|
|
|
|
|
|
NotificationService.Subscribe(new PushbulletNotification(PushbulletApi, PushbulletService));
|
|
|
|
|
if (settings.Enabled)
|
|
|
|
|
{
|
|
|
|
|
NotificationService.Subscribe(new PushbulletNotification(PushbulletApi, PushbulletService));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
NotificationService.UnSubscribe(new PushbulletNotification(PushbulletApi, PushbulletService));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Log.Info("Saved email settings, result: {0}", result);
|
|
|
|
|
return Response.AsJson(result
|
|
|
|
|