Add [Info] to keep the same format

pull/503/head
Iluha 3 years ago
parent 5204b29734
commit 155188f888

@ -252,7 +252,7 @@ namespace DepotDownloader
var password = Config.BetaPassword; var password = Config.BetaPassword;
while (string.IsNullOrEmpty(password)) while (string.IsNullOrEmpty(password))
{ {
Console.Write("[Password]|Please enter the password for branch {0}: ", branch); Console.Write("[Info]|[Password]|Please enter the password for branch {0}: ", branch);
Config.BetaPassword = password = Console.ReadLine(); Config.BetaPassword = password = Console.ReadLine();
} }
@ -1070,7 +1070,7 @@ namespace DepotDownloader
// we have a version of this file, but it doesn't fully match what we want // we have a version of this file, but it doesn't fully match what we want
if (Config.VerifyAll) if (Config.VerifyAll)
{ {
Console.WriteLine("[Validating]|Validating {0}", fileFinalPath); Console.WriteLine("[Info]|[Validating]|Validating {0}", fileFinalPath);
} }
var matchingChunks = new List<ChunkMatch>(); var matchingChunks = new List<ChunkMatch>();
@ -1162,7 +1162,7 @@ namespace DepotDownloader
} }
} }
Console.WriteLine("[Validating]|Validating {0}", fileFinalPath); Console.WriteLine("[Info]|[Validating]|Validating {0}", fileFinalPath);
neededChunks = Util.ValidateSteam3FileChecksums(fs, file.Chunks.OrderBy(x => x.Offset).ToArray()); neededChunks = Util.ValidateSteam3FileChecksums(fs, file.Chunks.OrderBy(x => x.Offset).ToArray());
} }
@ -1171,7 +1171,7 @@ namespace DepotDownloader
lock (depotDownloadCounter) lock (depotDownloadCounter)
{ {
depotDownloadCounter.SizeDownloaded += file.TotalSize; depotDownloadCounter.SizeDownloaded += file.TotalSize;
Console.WriteLine("[Validated]|{0:#00.00}%", (depotDownloadCounter.SizeDownloaded / (float)depotDownloadCounter.CompleteDownloadSize) * 100.0f); Console.WriteLine("[Info]|[Validated]|{0:#00.00}%", (depotDownloadCounter.SizeDownloaded / (float)depotDownloadCounter.CompleteDownloadSize) * 100.0f);
} }
return; return;
@ -1348,11 +1348,11 @@ namespace DepotDownloader
BytesPerSec = downloaded / elapsed; BytesPerSec = downloaded / elapsed;
Console.WriteLine("[Progress]|{0:#00.00}%|{1}|{2}|{3}/s", (sizeDownloaded / (float)depotDownloadCounter.CompleteDownloadSize) * 100.0f, SizeSuffix(sizeDownloaded), SizeSuffix(depotDownloadCounter.CompleteDownloadSize), SizeSuffix((UInt64)BytesPerSec)); Console.WriteLine("[Info]|[Progress]|{0:#00.00}%|{1}|{2}|{3}/s", (sizeDownloaded / (float)depotDownloadCounter.CompleteDownloadSize) * 100.0f, SizeSuffix(sizeDownloaded), SizeSuffix(depotDownloadCounter.CompleteDownloadSize), SizeSuffix((UInt64)BytesPerSec));
if (sizeDownloaded == depotDownloadCounter.CompleteDownloadSize) if (sizeDownloaded == depotDownloadCounter.CompleteDownloadSize)
{ {
Console.WriteLine("[Finished]|Download Finished"); Console.WriteLine("[Info]|[Finished]|Download Finished");
} }
} }

@ -11,14 +11,14 @@ public class DepotDownloaderAuthenticator : IAuthenticator
{ {
if (previousCodeWasIncorrect) if (previousCodeWasIncorrect)
{ {
Console.Out.WriteLine("[2FA]|[Wrong]|The previous 2-factor auth code you have provided is incorrect."); Console.Out.WriteLine("[Info]|[Wrong2FA]|The previous 2-factor auth code you have provided is incorrect.");
} }
string? code; string? code;
do do
{ {
Console.Out.Write("[2FA]|Please enter your 2 factor auth code from your authenticator app: "); Console.Out.Write("[Info]|[2FA]|Please enter your 2 factor auth code from your authenticator app: ");
code = Console.ReadLine()?.Trim(); code = Console.ReadLine()?.Trim();
if (code == null) if (code == null)
@ -34,14 +34,14 @@ public class DepotDownloaderAuthenticator : IAuthenticator
{ {
if (previousCodeWasIncorrect) if (previousCodeWasIncorrect)
{ {
Console.Out.WriteLine("[Guard]|[Wrong]|The previous 2-factor auth code you have provided is incorrect."); Console.Out.WriteLine("[Info]|[WrongGuard]|The previous 2-factor auth code you have provided is incorrect.");
} }
string? code; string? code;
do do
{ {
Console.Out.Write($"[Guard]|Please enter the authentication code sent to your email address: "); Console.Out.Write($"[Info]|[Guard]|Please enter the authentication code sent to your email address: ");
code = Console.ReadLine()?.Trim(); code = Console.ReadLine()?.Trim();
if (code == null) if (code == null)
@ -55,7 +55,7 @@ public class DepotDownloaderAuthenticator : IAuthenticator
public Task<bool> AcceptDeviceConfirmationAsync() public Task<bool> AcceptDeviceConfirmationAsync()
{ {
Console.Out.WriteLine("[MobileApp]|Use the Steam Mobile App to confirm your sign in..."); Console.Out.WriteLine("[Info]|[MobileApp]|Use the Steam Mobile App to confirm your sign in...");
return Task.FromResult(true); return Task.FromResult(true);
} }
} }

@ -275,7 +275,7 @@ namespace DepotDownloader
{ {
do do
{ {
Console.Write("[Password]|Enter account password for \"{0}\": ", username); Console.Write("[Info]|[Password]|Enter account password for \"{0}\": ", username);
if (Console.IsInputRedirected) if (Console.IsInputRedirected)
{ {
password = Console.ReadLine(); password = Console.ReadLine();

@ -547,14 +547,14 @@ namespace DepotDownloader
Console.WriteLine(); Console.WriteLine();
Console.WriteLine("The QR code has changed:"); Console.WriteLine("The QR code has changed:");
// Display the URL instead of the QR code // Display the URL instead of the QR code
Console.WriteLine("[QRCode]|[URL]|{0}", session.ChallengeURL); Console.WriteLine("[Info]|[QRCode]|{0}", session.ChallengeURL);
//DisplayQrCode(session.ChallengeURL); //DisplayQrCode(session.ChallengeURL);
}; };
// Draw initial QR code immediately // Draw initial QR code immediately
// Display the URL instead of the QR code // Display the URL instead of the QR code
Console.WriteLine("[QRCode]|[URL]|{0}", session.ChallengeURL); Console.WriteLine("[Info]|[QRCode]|{0}", session.ChallengeURL);
//DisplayQrCode(session.ChallengeURL); //DisplayQrCode(session.ChallengeURL);
} }
catch (TaskCanceledException) catch (TaskCanceledException)
@ -659,7 +659,7 @@ namespace DepotDownloader
{ {
do do
{ {
Console.Write("[2FA]|Please enter your 2 factor auth code from your authenticator app: "); Console.Write("[Info]|[2FA]|Please enter your 2 factor auth code from your authenticator app: ");
logonDetails.TwoFactorCode = Console.ReadLine(); logonDetails.TwoFactorCode = Console.ReadLine();
} while (String.Empty == logonDetails.TwoFactorCode); } while (String.Empty == logonDetails.TwoFactorCode);
} }
@ -677,7 +677,7 @@ namespace DepotDownloader
{ {
do do
{ {
Console.Write("[Guard]|Please enter the authentication code sent to your email address: "); Console.Write("[Info]|[Guard]|Please enter the authentication code sent to your email address: ");
logonDetails.AuthCode = Console.ReadLine(); logonDetails.AuthCode = Console.ReadLine();
} while (string.Empty == logonDetails.AuthCode); } while (string.Empty == logonDetails.AuthCode);
} }
@ -717,7 +717,7 @@ namespace DepotDownloader
this.seq++; this.seq++;
credentials.LoggedOn = true; credentials.LoggedOn = true;
Console.WriteLine("[SteamID]|" + loggedOn.ClientSteamID.ConvertToUInt64()); Console.WriteLine("[Info]|[SteamID]|" + loggedOn.ClientSteamID.ConvertToUInt64());
if (ContentDownloader.Config.CellID == 0) if (ContentDownloader.Config.CellID == 0)
{ {
@ -728,7 +728,7 @@ namespace DepotDownloader
private void SessionTokenCallback(SteamUser.SessionTokenCallback sessionToken) private void SessionTokenCallback(SteamUser.SessionTokenCallback sessionToken)
{ {
Console.WriteLine("[Success]|Got session token!"); Console.WriteLine("[Info]|[Success]|Got session token!");
credentials.SessionToken = sessionToken.SessionToken; credentials.SessionToken = sessionToken.SessionToken;
} }

Loading…
Cancel
Save