diff --git a/DepotDownloader/Program.cs b/DepotDownloader/Program.cs index ae9be3bf..99753f38 100644 --- a/DepotDownloader/Program.cs +++ b/DepotDownloader/Program.cs @@ -71,18 +71,17 @@ namespace DepotDownloader if (username == null) { - if (ContentDownloader.Config.RememberPassword) + if (ContentDownloader.Config.RememberPassword && !ContentDownloader.Config.UseQrCode) { - Console.WriteLine("Error: -remember-password can not be used without -username."); - return 1; - } - - if (ContentDownloader.Config.UseQrCode) - { - Console.WriteLine("Error: -qr can not be used without -username."); + Console.WriteLine("Error: -remember-password can not be used without -username or -qr."); return 1; } } + else if (ContentDownloader.Config.UseQrCode) + { + Console.WriteLine("Error: -qr can not be used with -username."); + return 1; + } ContentDownloader.Config.DownloadManifestOnly = HasParameter(args, "-manifest-only"); @@ -511,6 +510,7 @@ namespace DepotDownloader Console.WriteLine(" -password - the password of the account to login to for restricted content."); Console.WriteLine(" -remember-password - if set, remember the password for subsequent logins of this user."); Console.WriteLine(" use -username -remember-password as login credentials."); + Console.WriteLine(" -qr - display a login QR code to be scanned with the Steam mobile app"); Console.WriteLine(); Console.WriteLine(" -dir - the directory in which to place downloaded files."); Console.WriteLine(" -filelist - the name of a local file that contains a list of files to download (from the manifest)."); diff --git a/DepotDownloader/Steam3Session.cs b/DepotDownloader/Steam3Session.cs index d8aac38f..08ca9562 100644 --- a/DepotDownloader/Steam3Session.cs +++ b/DepotDownloader/Steam3Session.cs @@ -442,8 +442,9 @@ namespace DepotDownloader try { _ = AccountSettingsStore.Instance.GuardData.TryGetValue(logonDetails.Username, out var guarddata); - authSession = await steamClient.Authentication.BeginAuthSessionViaCredentialsAsync(new SteamKit2.Authentication.AuthSessionDetails + authSession = await steamClient.Authentication.BeginAuthSessionViaCredentialsAsync(new AuthSessionDetails { + DeviceFriendlyName = nameof(DepotDownloader), Username = logonDetails.Username, Password = logonDetails.Password, IsPersistentSession = ContentDownloader.Config.RememberPassword, @@ -470,8 +471,8 @@ namespace DepotDownloader { var session = await steamClient.Authentication.BeginAuthSessionViaQRAsync(new AuthSessionDetails { + DeviceFriendlyName = nameof(DepotDownloader), IsPersistentSession = ContentDownloader.Config.RememberPassword, - Authenticator = new UserConsoleAuthenticator(), }); authSession = session; diff --git a/README.md b/README.md index bbbef73e..4697aacf 100644 --- a/README.md +++ b/README.md @@ -61,14 +61,32 @@ For example: `./DepotDownloader -app 730 -ugc 770604181014286929` ## Parameters +#### Authentication + +Parameter | Description +----------------------- | ----------- +`-username ` | the username of the account to login to for restricted content. +`-password ` | the password of the account to login to for restricted content. +`-remember-password` | if set, remember the password for subsequent logins of this user. (Use `-username -remember-password` as login credentials) +`-qr` | display a login QR code to be scanned with the Steam mobile app +`-loginid <#>` | a unique 32-bit integer Steam LogonID in decimal, required if running multiple instances of DepotDownloader concurrently. + +#### Downloading + Parameter | Description ----------------------- | ----------- `-app <#>` | the AppID to download. `-depot <#>` | the DepotID to download. `-manifest ` | manifest id of content to download (requires `-depot`, default: current for branch). `-ugc <#>` | the UGC ID to download. +`-pubfile <#>` | the PublishedFileId to download. (Will automatically resolve to UGC id) `-branch ` | download from specified branch if available (default: Public). -`-branchpassword ` | branch password if applicable. +`-branchpassword ` | branch password if applicable. + +#### Download configuration + +Parameter | Description +----------------------- | ----------- `-all-platforms` | downloads all platform-specific depots when `-app` is used. `-os ` | the operating system for which to download the game (windows, macos or linux, default: OS the program is currently running on) `-osarch ` | the architecture for which to download the game (32 or 64, default: the host's architecture) @@ -76,18 +94,18 @@ Parameter | Description `-all-languages` | download all language-specific depots when `-app` is used. `-language ` | the language for which to download the game (default: english) `-lowviolence` | download low violence depots when `-app` is used. -`-pubfile <#>` | the PublishedFileId to download. (Will automatically resolve to UGC id) -`-username ` | the username of the account to login to for restricted content. -`-password ` | the password of the account to login to for restricted content. -`-remember-password` | if set, remember the password for subsequent logins of this user. (Use `-username -remember-password` as login credentials) `-dir ` | the directory in which to place downloaded files. `-filelist ` | the name of a local file that contains a list of files to download (from the manifest). prefix file path with `regex:` if you want to match with regex. each file path should be on their own line. `-validate` | include checksum verification of files already downloaded. `-manifest-only` | downloads a human readable manifest for any depots that would be downloaded. `-cellid <#>` | the overridden CellID of the content server to download from. `-max-downloads <#>` | maximum number of chunks to download concurrently. (default: 8). -`-loginid <#>` | a unique 32-bit integer Steam LogonID in decimal, required if running multiple instances of DepotDownloader concurrently `-use-lancache` | forces downloads over the local network via a Lancache instance. + +#### Other + +Parameter | Description +----------------------- | ----------- `-debug` | enable verbose debug logging. `-V` or `--version` | print version and runtime.