From 5bd85a3aacc150524647a2e7445e330818f85c6a Mon Sep 17 00:00:00 2001 From: tidusjar Date: Wed, 7 Apr 2021 20:27:24 +0100 Subject: [PATCH] Fixed #4140 --- src/Ombi.Helpers/AssemblyHelper.cs | 4 +++- src/Ombi.Schedule/Processor/ChangeLogProcessor.cs | 2 +- .../ClientApp/src/app/settings/about/about.component.html | 6 ++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Ombi.Helpers/AssemblyHelper.cs b/src/Ombi.Helpers/AssemblyHelper.cs index eb4dc55fd..9abc3bf92 100644 --- a/src/Ombi.Helpers/AssemblyHelper.cs +++ b/src/Ombi.Helpers/AssemblyHelper.cs @@ -1,4 +1,5 @@ using Microsoft.Extensions.PlatformAbstractions; +using System.Linq; using System.Reflection; namespace Ombi.Helpers @@ -8,7 +9,8 @@ namespace Ombi.Helpers public static string GetRuntimeVersion() { ApplicationEnvironment app = PlatformServices.Default.Application; - return app.ApplicationVersion; + var split = app.ApplicationVersion.Split('.'); + return string.Join('.', split.Take(3)); } } } \ No newline at end of file diff --git a/src/Ombi.Schedule/Processor/ChangeLogProcessor.cs b/src/Ombi.Schedule/Processor/ChangeLogProcessor.cs index 89a6519e6..cffb5e508 100644 --- a/src/Ombi.Schedule/Processor/ChangeLogProcessor.cs +++ b/src/Ombi.Schedule/Processor/ChangeLogProcessor.cs @@ -49,7 +49,7 @@ namespace Ombi.Schedule.Processor UpdateDate = DateTime.Now, ChangeLogs = release.Description, Downloads = new List(), - UpdateAvailable = release.Version != AssemblyHelper.GetRuntimeVersion() + UpdateAvailable = release.Version != "v" + AssemblyHelper.GetRuntimeVersion() }; foreach (var dl in release.Downloads) diff --git a/src/Ombi/ClientApp/src/app/settings/about/about.component.html b/src/Ombi/ClientApp/src/app/settings/about/about.component.html index f4872eda7..b823bdc7a 100644 --- a/src/Ombi/ClientApp/src/app/settings/about/about.component.html +++ b/src/Ombi/ClientApp/src/app/settings/about/about.component.html @@ -13,8 +13,10 @@
Version
-
{{about.version}} (New Update Available)
+
{{about.version}}   (New Update Available) + +