|
|
@ -126,7 +126,7 @@ namespace Ombi.UI.Modules.Admin
|
|
|
|
ISlackApi slackApi, ISettingsService<LandingPageSettings> lp,
|
|
|
|
ISlackApi slackApi, ISettingsService<LandingPageSettings> lp,
|
|
|
|
ISettingsService<ScheduledJobsSettings> scheduler, IJobRecord rec, IAnalytics analytics,
|
|
|
|
ISettingsService<ScheduledJobsSettings> scheduler, IJobRecord rec, IAnalytics analytics,
|
|
|
|
ISettingsService<NotificationSettingsV2> notifyService, IRecentlyAdded recentlyAdded, IMassEmail massEmail,
|
|
|
|
ISettingsService<NotificationSettingsV2> notifyService, IRecentlyAdded recentlyAdded, IMassEmail massEmail,
|
|
|
|
ISettingsService<WatcherSettings> watcherSettings ,
|
|
|
|
ISettingsService<WatcherSettings> watcherSettings,
|
|
|
|
ISettingsService<DiscordNotificationSettings> discord,
|
|
|
|
ISettingsService<DiscordNotificationSettings> discord,
|
|
|
|
IDiscordApi discordapi, ISettingsService<RadarrSettings> settings, IRadarrApi radarrApi,
|
|
|
|
IDiscordApi discordapi, ISettingsService<RadarrSettings> settings, IRadarrApi radarrApi,
|
|
|
|
ISettingsService<EmbySettings> embySettings, IEmbyApi emby
|
|
|
|
ISettingsService<EmbySettings> embySettings, IEmbyApi emby
|
|
|
@ -642,9 +642,11 @@ namespace Ombi.UI.Modules.Admin
|
|
|
|
await NotificationService.Publish(notificationModel, settings);
|
|
|
|
await NotificationService.Publish(notificationModel, settings);
|
|
|
|
Log.Info("Sent email notification test");
|
|
|
|
Log.Info("Sent email notification test");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (Exception)
|
|
|
|
catch (Exception ex)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Log.Error("Failed to subscribe and publish test Email Notification");
|
|
|
|
Log.Error("Failed to subscribe and publish test Email Notification");
|
|
|
|
|
|
|
|
var msg = "Failed: " + ex.Message;
|
|
|
|
|
|
|
|
return Response.AsJson(new JsonResponseModel { Result = false, Message = msg });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
finally
|
|
|
|
finally
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -653,7 +655,9 @@ namespace Ombi.UI.Modules.Admin
|
|
|
|
NotificationService.UnSubscribe(new EmailMessageNotification(EmailService));
|
|
|
|
NotificationService.UnSubscribe(new EmailMessageNotification(EmailService));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return Response.AsJson(new JsonResponseModel { Result = true, Message = "Successfully sent a test Email Notification!" });
|
|
|
|
return Response.AsJson(new JsonResponseModel { Result = true, Message = "Successfully sent a test Email Notification!" });
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private Response SaveEmailNotifications()
|
|
|
|
private Response SaveEmailNotifications()
|
|
|
@ -832,7 +836,7 @@ namespace Ombi.UI.Modules.Admin
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!settings.Enabled)
|
|
|
|
if (!settings.Enabled)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return Response.AsJson(new CouchPotatoProfiles{list = new List<ProfileList>()});
|
|
|
|
return Response.AsJson(new CouchPotatoProfiles { list = new List<ProfileList>() });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var profiles = CpApi.GetProfiles(settings.FullUri, settings.ApiKey);
|
|
|
|
var profiles = CpApi.GetProfiles(settings.FullUri, settings.ApiKey);
|
|
|
|
|
|
|
|
|
|
|
@ -1299,7 +1303,8 @@ namespace Ombi.UI.Modules.Admin
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var settings = this.Bind<MassEmailSettings>();
|
|
|
|
var settings = this.Bind<MassEmailSettings>();
|
|
|
|
Log.Debug("Clicked Admin Mass Email Test");
|
|
|
|
Log.Debug("Clicked Admin Mass Email Test");
|
|
|
|
if (settings.Subject == null) {
|
|
|
|
if (settings.Subject == null)
|
|
|
|
|
|
|
|
{
|
|
|
|
return Response.AsJson(new JsonResponseModel { Result = false, Message = "Please Set a Subject" });
|
|
|
|
return Response.AsJson(new JsonResponseModel { Result = false, Message = "Please Set a Subject" });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (settings.Body == null)
|
|
|
|
if (settings.Body == null)
|
|
|
|