From b3c7d83529bd548d2eb011a2e02e5ebd412aa6c2 Mon Sep 17 00:00:00 2001 From: "Jamie.Rees" Date: Thu, 29 Dec 2016 08:20:27 +0000 Subject: [PATCH] Fixed #832 --- Ombi.Services/Jobs/PlexUserChecker.cs | 3 +++ Ombi.UI/Modules/Admin/AdminModule.cs | 2 +- .../Views/Admin/PushoverNotifications.cshtml | 17 +++-------------- Ombi.UI/Views/Shared/Partial/_Navbar.cshtml | 6 +----- 4 files changed, 8 insertions(+), 20 deletions(-) diff --git a/Ombi.Services/Jobs/PlexUserChecker.cs b/Ombi.Services/Jobs/PlexUserChecker.cs index 7b8c82e6f..d09bba28c 100644 --- a/Ombi.Services/Jobs/PlexUserChecker.cs +++ b/Ombi.Services/Jobs/PlexUserChecker.cs @@ -167,6 +167,9 @@ public void Execute(IJobExecutionContext context) // Main Plex user var dbMainAcc = dbUsers.FirstOrDefault(x => x.Username.Equals(mainPlexAccount.Username, StringComparison.CurrentCulture)); var localMainAcc = localUsers.FirstOrDefault(x => x.UserName.Equals(mainPlexAccount.Username, StringComparison.CurrentCulture)); + + // TODO if admin acc does exist, check if we need to update it + // Create the local admin account if it doesn't already exist if (dbMainAcc == null && localMainAcc == null) diff --git a/Ombi.UI/Modules/Admin/AdminModule.cs b/Ombi.UI/Modules/Admin/AdminModule.cs index 15dbd81d3..2b3601924 100644 --- a/Ombi.UI/Modules/Admin/AdminModule.cs +++ b/Ombi.UI/Modules/Admin/AdminModule.cs @@ -672,7 +672,7 @@ private async Task TestPushoverNotifications() NotificationType = NotificationType.Test, DateTime = DateTime.Now }; - var currentSettings = await PushbulletService.GetSettingsAsync(); + var currentSettings = await PushoverService.GetSettingsAsync(); try { NotificationService.Subscribe(new PushoverNotification(PushoverApi, PushoverService)); diff --git a/Ombi.UI/Views/Admin/PushoverNotifications.cshtml b/Ombi.UI/Views/Admin/PushoverNotifications.cshtml index b5df6bdc5..efc5ddb1d 100644 --- a/Ombi.UI/Views/Admin/PushoverNotifications.cshtml +++ b/Ombi.UI/Views/Admin/PushoverNotifications.cshtml @@ -1,25 +1,14 @@ @using Ombi.UI.Helpers +@inherits Nancy.ViewEngines.Razor.NancyRazorViewBase @Html.Partial("Shared/Partial/_Sidebar")
Pushover Notifications + -
-
- - @if (Model.Enabled) - { - - } - else - { - - } - -
-
+ @Html.Checkbox(Model.Enabled, "Enabled", "Enabled")
diff --git a/Ombi.UI/Views/Shared/Partial/_Navbar.cshtml b/Ombi.UI/Views/Shared/Partial/_Navbar.cshtml index 95b356746..3107c5866 100644 --- a/Ombi.UI/Views/Shared/Partial/_Navbar.cshtml +++ b/Ombi.UI/Views/Shared/Partial/_Navbar.cshtml @@ -52,10 +52,6 @@