From 26e1ef3d55996c236f6a0ec6f0d1947a9652ceef Mon Sep 17 00:00:00 2001 From: Casper Sparre Date: Wed, 1 May 2024 22:54:28 +0200 Subject: [PATCH] Updated to allow running Non-Interactive mode from command line. --- OF DL/Program.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/OF DL/Program.cs b/OF DL/Program.cs index 3a6594c..67e9843 100644 --- a/OF DL/Program.cs +++ b/OF DL/Program.cs @@ -35,7 +35,7 @@ static Program() m_DownloadHelper = new DownloadHelper(); } - public async static Task Main() + public async static Task Main(string[] args) { try { @@ -175,6 +175,13 @@ public async static Task Main() return; } + if (args is not null && args.Length > 0) + { + const string NON_INTERACTIVE_ARG = "--non-interactive"; + + if (args.Any(a => NON_INTERACTIVE_ARG.Equals(NON_INTERACTIVE_ARG, StringComparison.OrdinalIgnoreCase))) + Config.NonInteractiveMode = true; + } AnsiConsole.Markup($"[green]Logged In successfully as {validate.name} {validate.username}\n[/]"); await DownloadAllData();