From da81b0de6db7df8dc7b916cfd627e21a838dfbb3 Mon Sep 17 00:00:00 2001 From: "Jamie.Rees" Date: Thu, 16 Feb 2017 08:18:16 +0000 Subject: [PATCH 1/2] Stop Plex being enabled on the first time installing #1048 --- Ombi.Core.Migration/Migrations/Version1100.cs | 2 +- Ombi.Core.Migration/Migrations/Version195.cs | 1 + Ombi.Core.Migration/Migrations/Version2200.cs | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Ombi.Core.Migration/Migrations/Version1100.cs b/Ombi.Core.Migration/Migrations/Version1100.cs index 4c184ca22..52d5139fb 100644 --- a/Ombi.Core.Migration/Migrations/Version1100.cs +++ b/Ombi.Core.Migration/Migrations/Version1100.cs @@ -181,7 +181,7 @@ namespace Ombi.Core.Migration.Migrations try { var settings = PlexSettings.GetSettings(); - if (string.IsNullOrEmpty(settings.PlexAuthToken)) + if (string.IsNullOrEmpty(settings.PlexAuthToken) || !settings.Enable) { return; } diff --git a/Ombi.Core.Migration/Migrations/Version195.cs b/Ombi.Core.Migration/Migrations/Version195.cs index 3dee6a9e5..832490f90 100644 --- a/Ombi.Core.Migration/Migrations/Version195.cs +++ b/Ombi.Core.Migration/Migrations/Version195.cs @@ -62,6 +62,7 @@ namespace Ombi.Core.Migration.Migrations private void UpdateApplicationSettings() { var plex = PlexRequestSettings.GetSettings(); + var jobSettings = Jobs.GetSettings(); var newsLetter = NewsletterSettings.GetSettings(); diff --git a/Ombi.Core.Migration/Migrations/Version2200.cs b/Ombi.Core.Migration/Migrations/Version2200.cs index 79939c8e3..de9f0d77e 100644 --- a/Ombi.Core.Migration/Migrations/Version2200.cs +++ b/Ombi.Core.Migration/Migrations/Version2200.cs @@ -68,8 +68,11 @@ namespace Ombi.Core.Migration.Migrations { #if !DEBUG var s = PlexSettings.GetSettings(); - s.Enable = true; - PlexSettings.SaveSettings(s); + if (!string.IsNullOrEmpty(s.Ip)) + { + s.Enable = true; + PlexSettings.SaveSettings(s); + } #endif } private void UpdateCustomSettings() From 487abf3ac2df20e4c1b5a19668a00bf738d97f39 Mon Sep 17 00:00:00 2001 From: "Jamie.Rees" Date: Thu, 16 Feb 2017 15:20:48 +0000 Subject: [PATCH 2/2] Fixed issues img --- Ombi.UI/Modules/IssuesModule.cs | 2 +- Ombi.UI/Views/Issues/Details.cshtml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Ombi.UI/Modules/IssuesModule.cs b/Ombi.UI/Modules/IssuesModule.cs index 58897355a..e54962aba 100644 --- a/Ombi.UI/Modules/IssuesModule.cs +++ b/Ombi.UI/Modules/IssuesModule.cs @@ -145,7 +145,7 @@ namespace Ombi.UI.Modules Deleted = issue.Deleted, Type = issue.Type, ProviderId = issue.ProviderId, - PosterUrl = issue.PosterUrl, + PosterUrl = issue.PosterUrl.Contains("https://image.tmdb.org/t/p/w150/") ? issue.PosterUrl : $"https://image.tmdb.org/t/p/w150/{issue.PosterUrl}", Id = issue.Id }; return View["Details", m]; diff --git a/Ombi.UI/Views/Issues/Details.cshtml b/Ombi.UI/Views/Issues/Details.cshtml index c5567209a..da025b9cc 100644 --- a/Ombi.UI/Views/Issues/Details.cshtml +++ b/Ombi.UI/Views/Issues/Details.cshtml @@ -18,7 +18,7 @@
- +

Issues For "@Model.Title"