diff --git a/TallyCore/Web/Utility/CheckForNewRelease.cs b/TallyCore/Web/Utility/CheckForNewRelease.cs index df56a4ba..5f0f1b95 100644 --- a/TallyCore/Web/Utility/CheckForNewRelease.cs +++ b/TallyCore/Web/Utility/CheckForNewRelease.cs @@ -8,6 +8,7 @@ using System.Threading.Tasks; using HtmlAgilityPack; using NetTally.Web; +using NetTally.Adapters; namespace NetTally { @@ -143,11 +144,16 @@ private async Task GetLatestVersionString() if (htmldoc != null) { - var h1ReleaseTitle = htmldoc.DocumentNode.Descendants("h1")?.FirstOrDefault(n => n.GetAttributeValue("class", "").Contains("release-title")); + var latest = htmldoc.DocumentNode.GetDescendantWithClass("div", "label-latest"); - if (h1ReleaseTitle != null) + if (latest != null) { - return GetVersionString(h1ReleaseTitle.InnerText); + var releaseTitle = latest.GetDescendantWithClass("h1", "release-title"); + + if (releaseTitle != null) + { + return GetVersionString(releaseTitle.InnerText); + } } } }