From c21489d304363160cd313343d8be16851dee7196 Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Sun, 4 May 2025 12:16:55 +0300 Subject: [PATCH] Remove asking for beta password interactively because it messes with beta branches For example steamvr has a public beta branch, and it also includes shared redist depots which obviously have no beta branch. --- DepotDownloader/ContentDownloader.cs | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/DepotDownloader/ContentDownloader.cs b/DepotDownloader/ContentDownloader.cs index 32d1cb8c..967cc499 100644 --- a/DepotDownloader/ContentDownloader.cs +++ b/DepotDownloader/ContentDownloader.cs @@ -246,17 +246,10 @@ namespace DepotDownloader return INVALID_MANIFEST_ID; // Either the branch just doesn't exist, or it has a password - var password = Config.BetaPassword; - - if (string.IsNullOrEmpty(password)) - { - Console.WriteLine($"Branch {branch} was not found, either it does not exist or it has a password."); - } - - while (string.IsNullOrEmpty(password)) + if (string.IsNullOrEmpty(Config.BetaPassword)) { - Console.Write($"Please enter the password for branch {branch}: "); - Config.BetaPassword = password = Console.ReadLine(); + Console.WriteLine($"Branch {branch} for depot {depotId} was not found, either it does not exist or it has a password."); + return INVALID_MANIFEST_ID; } if (!steam3.AppBetaPasswords.ContainsKey(branch)) @@ -264,7 +257,7 @@ namespace DepotDownloader // Submit the password to Steam now to get encryption keys await steam3.CheckAppBetaPassword(appId, Config.BetaPassword); - if (!steam3.AppBetaPasswords.TryGetValue(branch, out var appBetaPassword)) + if (!steam3.AppBetaPasswords.ContainsKey(branch)) { Console.WriteLine($"Error: Password was invalid for branch {branch} (or the branch does not exist)"); return INVALID_MANIFEST_ID; @@ -549,6 +542,8 @@ namespace DepotDownloader } } + Console.WriteLine(); + try { await DownloadSteam3Async(infos).ConfigureAwait(false);