Fixed crash/error #865

This commit is contained in:
tidusjar 2017-10-03 22:52:41 +01:00
commit 8695383abf

View file

@ -43,11 +43,18 @@ namespace Ombi.Schedule.Jobs.Ombi
return productArray; return productArray;
} }
public async Task<bool> UpdateAvailable(string branch, string currentVersion) public async Task<bool> UpdateAvailable(string branch, string currentVersion)
{
try
{ {
var updates = await OmbiService.GetUpdates(branch); var updates = await OmbiService.GetUpdates(branch);
var serverVersion = updates.UpdateVersionString; var serverVersion = updates.UpdateVersionString;
return !serverVersion.Equals(currentVersion, StringComparison.CurrentCultureIgnoreCase); return !serverVersion.Equals(currentVersion, StringComparison.CurrentCultureIgnoreCase);
} }
catch (Exception e)
{
Logger.LogError(e, "Attempted to check if there was an update");
}
}
public async Task Update(PerformContext c) public async Task Update(PerformContext c)
{ {