mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-15 01:23:53 -07:00
Removed check for update button, latest version will have install link
This commit is contained in:
parent
e4b2c30616
commit
03fac8bfe5
9 changed files with 75 additions and 70 deletions
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using NLog;
|
||||
using NzbDrone.Common;
|
||||
using NzbDrone.Common.EnvironmentInfo;
|
||||
|
@ -10,7 +11,12 @@ using NzbDrone.Core.Instrumentation;
|
|||
|
||||
namespace NzbDrone.Core.Update
|
||||
{
|
||||
public class InstallUpdateService : IExecute<ApplicationUpdateCommand>
|
||||
public interface IInstallUpdates
|
||||
{
|
||||
void InstallUpdate(UpdatePackage updatePackage);
|
||||
}
|
||||
|
||||
public class InstallUpdateService : IInstallUpdates, IExecute<ApplicationUpdateCommand>
|
||||
{
|
||||
private readonly ICheckUpdateService _checkUpdateService;
|
||||
private readonly Logger _logger;
|
||||
|
@ -35,19 +41,7 @@ namespace NzbDrone.Core.Update
|
|||
_logger = logger;
|
||||
}
|
||||
|
||||
|
||||
public void Execute(ApplicationUpdateCommand message)
|
||||
{
|
||||
_logger.ProgressDebug("Checking for updates");
|
||||
var latestAvailable = _checkUpdateService.AvailableUpdate();
|
||||
|
||||
if (latestAvailable != null)
|
||||
{
|
||||
InstallUpdate(latestAvailable);
|
||||
}
|
||||
}
|
||||
|
||||
private void InstallUpdate(UpdatePackage updatePackage)
|
||||
public void InstallUpdate(UpdatePackage updatePackage)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -84,5 +78,16 @@ namespace NzbDrone.Core.Update
|
|||
_logger.ErrorException("Update process failed", ex);
|
||||
}
|
||||
}
|
||||
|
||||
public void Execute(ApplicationUpdateCommand message)
|
||||
{
|
||||
_logger.ProgressDebug("Checking for updates");
|
||||
var latestAvailable = _checkUpdateService.AvailableUpdate();
|
||||
|
||||
if (latestAvailable != null)
|
||||
{
|
||||
InstallUpdate(latestAvailable);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue