mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-22 22:14:44 -04:00
Pass data cmd argument between application and update.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices.ComTypes;
|
||||
|
||||
namespace NzbDrone.Common.EnvironmentInfo
|
||||
{
|
||||
@@ -8,6 +9,8 @@ namespace NzbDrone.Common.EnvironmentInfo
|
||||
Dictionary<string, string> Args { get; }
|
||||
bool InstallService { get; }
|
||||
bool UninstallService { get; }
|
||||
|
||||
string PreservedArguments { get; }
|
||||
}
|
||||
|
||||
public class StartupContext : IStartupContext
|
||||
@@ -60,5 +63,25 @@ namespace NzbDrone.Common.EnvironmentInfo
|
||||
return Flags.Contains(UNINSTALL_SERVICE);
|
||||
}
|
||||
}
|
||||
|
||||
public string PreservedArguments
|
||||
{
|
||||
get
|
||||
{
|
||||
var args = "";
|
||||
|
||||
if (Args.ContainsKey(APPDATA))
|
||||
{
|
||||
args = "/data=" + Args[APPDATA];
|
||||
}
|
||||
|
||||
if (Flags.Contains(NO_BROWSER))
|
||||
{
|
||||
args += " /" + NO_BROWSER;
|
||||
}
|
||||
|
||||
return args.Trim();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user