Change Sonarr / NzbDrone auto-updater stuff to Radarr. (#61)

This is required in order for the auto-updater to work.
pull/2/head
Mike 8 years ago committed by GitHub
parent cb12945270
commit d62dbd48ae

@ -16,10 +16,10 @@ namespace NzbDrone.Common.Extensions
private const string UPDATE_CLIENT_EXE = "Radarr.Update.exe";
private const string BACKUP_FOLDER = "Backups";
private static readonly string UPDATE_SANDBOX_FOLDER_NAME = "nzbdrone_update" + Path.DirectorySeparatorChar;
private static readonly string UPDATE_PACKAGE_FOLDER_NAME = "";
private static readonly string UPDATE_BACKUP_FOLDER_NAME = "nzbdrone_backup" + Path.DirectorySeparatorChar;
private static readonly string UPDATE_BACKUP_APPDATA_FOLDER_NAME = "nzbdrone_appdata_backup" + Path.DirectorySeparatorChar;
private static readonly string UPDATE_SANDBOX_FOLDER_NAME = "radarr_update" + Path.DirectorySeparatorChar;
private static readonly string UPDATE_PACKAGE_FOLDER_NAME = "Radarr" + Path.DirectorySeparatorChar;
private static readonly string UPDATE_BACKUP_FOLDER_NAME = "radarr_backup" + Path.DirectorySeparatorChar;
private static readonly string UPDATE_BACKUP_APPDATA_FOLDER_NAME = "radarr_appdata_backup" + Path.DirectorySeparatorChar;
private static readonly string UPDATE_CLIENT_FOLDER_NAME = "NzbDrone.Update" + Path.DirectorySeparatorChar;
private static readonly string UPDATE_LOG_FOLDER_NAME = "UpdateLogs" + Path.DirectorySeparatorChar;

@ -129,7 +129,7 @@ namespace NzbDrone.Core.Update
_diskTransferService.TransferFolder(_appFolderInfo.GetUpdateClientFolder(), updateSandboxFolder, TransferMode.Move, false);
_logger.Info("Starting update client {0}", _appFolderInfo.GetUpdateClientExePath());
_logger.ProgressInfo("Sonarr will restart shortly.");
_logger.ProgressInfo("Radarr will restart shortly.");
_processProvider.Start(_appFolderInfo.GetUpdateClientExePath(), GetUpdaterArgs(updateSandboxFolder));
}
@ -187,7 +187,7 @@ namespace NzbDrone.Core.Update
if (_appFolderInfo.StartUpFolder.IsParentPath(_appFolderInfo.AppDataFolder) ||
_appFolderInfo.StartUpFolder.PathEquals(_appFolderInfo.AppDataFolder))
{
throw new UpdateFailedException("Your Sonarr configuration '{0}' is being stored in application folder '{1}' which will cause data lost during the upgrade. Please remove any symlinks or redirects before trying again.", _appFolderInfo.AppDataFolder, _appFolderInfo.StartUpFolder);
throw new UpdateFailedException("Your Radarr configuration '{0}' is being stored in application folder '{1}' which will cause data lost during the upgrade. Please remove any symlinks or redirects before trying again.", _appFolderInfo.AppDataFolder, _appFolderInfo.StartUpFolder);
}
}

@ -36,7 +36,7 @@ namespace NzbDrone.Update
var startupArgument = new StartupContext(args);
NzbDroneLogger.Register(startupArgument, true, true);
Logger.Info("Starting Sonarr Update Client");
Logger.Info("Starting Radarr Update Client");
_container = UpdateContainerBuilder.Build(startupArgument);
@ -66,9 +66,9 @@ namespace NzbDrone.Update
}
var startupContext = new UpdateStartupContext
{
ProcessId = ParseProcessId(args[0])
};
{
ProcessId = ParseProcessId(args[0])
};
if (OsInfo.IsNotWindows)
{

@ -80,7 +80,7 @@ namespace NzbDrone.Update.UpdateEngine
public void Start(string installationFolder, int processId)
{
_logger.Info("Installation Folder: {0}", installationFolder);
_logger.Info("Updating Sonarr from version {0} to version {1}", _detectExistingVersion.GetExistingVersion(installationFolder), BuildInfo.Version);
_logger.Info("Updating Radarr from version {0} to version {1}", _detectExistingVersion.GetExistingVersion(installationFolder), BuildInfo.Version);
Verify(installationFolder, processId);
@ -103,7 +103,7 @@ namespace NzbDrone.Update.UpdateEngine
{
if (_processProvider.Exists(ProcessProvider.NZB_DRONE_CONSOLE_PROCESS_NAME) || _processProvider.Exists(ProcessProvider.NZB_DRONE_PROCESS_NAME))
{
_logger.Error("Sonarr was restarted prematurely by external process.");
_logger.Error("Radarr was restarted prematurely by external process.");
return;
}
}
@ -146,7 +146,7 @@ namespace NzbDrone.Update.UpdateEngine
if (_processProvider.Exists(ProcessProvider.NZB_DRONE_PROCESS_NAME))
{
_logger.Info("Sonarr was restarted by external process.");
_logger.Info("Radarr was restarted by external process.");
break;
}
}

Loading…
Cancel
Save