mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 10:36:54 -07:00
Fixed the update check for the master build
This commit is contained in:
parent
012abc8c08
commit
5a22802663
1 changed files with 9 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
|
@ -9,6 +10,7 @@ using Octokit;
|
|||
using Ombi.Api;
|
||||
using Ombi.Api.Service;
|
||||
using Ombi.Core.Processor;
|
||||
using Ombi.Helpers;
|
||||
|
||||
namespace Ombi.Schedule.Processor
|
||||
{
|
||||
|
@ -44,7 +46,8 @@ namespace Ombi.Schedule.Processor
|
|||
if (masterBranch)
|
||||
{
|
||||
latestRelease = doc.DocumentNode.Descendants("h2")
|
||||
.FirstOrDefault(x => x.InnerText != "(unreleased)");
|
||||
.FirstOrDefault(x => x.InnerText == "(unreleased)");
|
||||
// TODO: Change this to InnterText != "(unreleased)" once we go live and it's not a prerelease
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -173,10 +176,13 @@ namespace Ombi.Schedule.Processor
|
|||
|
||||
var releases = await client.Repository.Release.GetAll("tidusjar", "ombi");
|
||||
var latest = releases.FirstOrDefault(x => x.TagName == releaseTag);
|
||||
|
||||
if (latest.Name.Contains("V2", CompareOptions.IgnoreCase))
|
||||
{
|
||||
latest = null;
|
||||
}
|
||||
if (latest == null)
|
||||
{
|
||||
latest = releases.OrderBy(x => x.CreatedAt).FirstOrDefault();
|
||||
latest = releases.OrderByDescending(x => x.CreatedAt).FirstOrDefault();
|
||||
}
|
||||
foreach (var item in latest.Assets)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue