From dc311ba82ec004fa577af5c2f65ebac90d6bd589 Mon Sep 17 00:00:00 2001 From: Jasmine Wells Date: Wed, 19 Jun 2024 16:28:45 -0700 Subject: [PATCH] Move Environment.Exit() calls outside of the non-interactive conditional block. Also trim some trailing whitespaces. --- OF DL/Program.cs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/OF DL/Program.cs b/OF DL/Program.cs index 278999e..a5780ca 100644 --- a/OF DL/Program.cs +++ b/OF DL/Program.cs @@ -39,7 +39,7 @@ public async static Task Main(string[] args) AnsiConsole.Write(new FigletText("Welcome to OF-DL").Color(Color.Red)); Auth? auth = null; - Config? config = null; + Config? config = null; if (args is not null && args.Length > 0) { @@ -63,8 +63,8 @@ public async static Task Main(string[] args) if (!cliNonInteractive) { Console.ReadKey(); - Environment.Exit(1); } + Environment.Exit(1); } else { @@ -91,8 +91,8 @@ public async static Task Main(string[] args) if (!cliNonInteractive) { Console.ReadKey(); - Environment.Exit(2); } + Environment.Exit(2); } } else @@ -104,8 +104,8 @@ public async static Task Main(string[] args) if (!cliNonInteractive) { Console.ReadKey(); - Environment.Exit(2); - } + } + Environment.Exit(2); } if (File.Exists("config.json")) @@ -127,8 +127,8 @@ public async static Task Main(string[] args) if (!cliNonInteractive) { Console.ReadKey(); - Environment.Exit(3); - } + } + Environment.Exit(3); } } else @@ -140,8 +140,8 @@ public async static Task Main(string[] args) if (!cliNonInteractive) { Console.ReadKey(); - Environment.Exit(3); } + Environment.Exit(3); } if(cliNonInteractive) @@ -217,8 +217,8 @@ public async static Task Main(string[] args) if (!config.NonInteractiveMode) { Console.ReadKey(); - Environment.Exit(4); } + Environment.Exit(4); } if (!File.Exists(Path.Join(WidevineClient.Widevine.Constants.DEVICES_FOLDER, WidevineClient.Widevine.Constants.DEVICE_NAME, "device_client_id_blob"))) @@ -277,8 +277,8 @@ public async static Task Main(string[] args) if (!cliNonInteractive) { Console.ReadKey(); - Environment.Exit(5); } + Environment.Exit(5); } } @@ -401,14 +401,14 @@ private static async Task DownloadAllData(APIHelper m_ApiHelper, Auth Auth, Conf } else { - path = $"__user_data__/sites/OnlyFans/{user.Key}"; + path = $"__user_data__/sites/OnlyFans/{user.Key}"; } await dBHelper.CheckUsername(user, path); if (!Directory.Exists(path)) { - Directory.CreateDirectory(path); + Directory.CreateDirectory(path); AnsiConsole.Markup($"[red]Created folder for {user.Key}\n[/]"); } else @@ -497,7 +497,7 @@ private static async Task DownloadAllData(APIHelper m_ApiHelper, Auth Auth, Conf else { AnsiConsole.Markup($"[red]Folder for {user.Key} already created\n[/]"); - } + } await dBHelper.CreateDB(path);