diff --git a/CHANGELIST.md b/CHANGELIST.md index 3261ff38..d0b9d83d 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -26,6 +26,7 @@ - Fix minor issues with options loading - Finalize wire-through and clean up - Minor cleanup on interactive modes +- Add more useful credentials inputs for Check ### 3.4.2 (2025-09-30) diff --git a/MPF.Check/Features/BaseFeature.cs b/MPF.Check/Features/BaseFeature.cs index 000333a0..558bbce2 100644 --- a/MPF.Check/Features/BaseFeature.cs +++ b/MPF.Check/Features/BaseFeature.cs @@ -153,8 +153,10 @@ namespace MPF.Check.Features Console.WriteLine(" --no-placeholders Disable placeholder values in submission info"); Console.WriteLine(" --create-ird Create IRD from output files (PS3 only)"); Console.WriteLine(" --no-retrieve Disable retrieving match information from Redump"); - Console.WriteLine("-c, --credentials Redump username and password (incompatible with --no-retrieve)"); - Console.WriteLine(" --pull-all Pull all information from Redump (requires --credentials)"); + Console.WriteLine("-c, --credentials Redump username and password (incompatible with --no-retrieve) [WILL BE REMOVED]"); + Console.WriteLine("-U, --username Redump username (incompatible with --no-retrieve)"); + Console.WriteLine("-P, --password Redump password (incompatible with --no-retrieve)"); + Console.WriteLine(" --pull-all Pull all information from Redump (requires --username and --password)"); Console.WriteLine("-p, --path Physical drive path for additional checks"); Console.WriteLine("-s, --scan Enable copy protection scan (requires --path)"); Console.WriteLine(" --disable-archives Disable scanning archives (requires --scan)"); diff --git a/MPF.Check/Features/MainFeature.cs b/MPF.Check/Features/MainFeature.cs index 64384a83..b5f45c78 100644 --- a/MPF.Check/Features/MainFeature.cs +++ b/MPF.Check/Features/MainFeature.cs @@ -56,11 +56,14 @@ namespace MPF.Check.Features private const string _noRetrieveName = "no-retrieve"; internal readonly FlagInput NoRetrieveInput = new(_noRetrieveName, "--no-retrieve", "Disable retrieving match information from Redump"); + private const string _passwordName = "password"; + internal readonly StringInput PasswordInput = new(_passwordName, ["-P", "--password"], "Redump password (incompatible with --no-retrieve)"); + private const string _pathName = "path"; internal readonly StringInput PathInput = new(_pathName, ["-p", "--path"], "Physical drive path for additional checks"); private const string _pullAllName = "pull-all"; - internal readonly FlagInput PullAllInput = new(_pullAllName, "--pull-all", "Pull all information from Redump (requires --credentials)"); + internal readonly FlagInput PullAllInput = new(_pullAllName, "--pull-all", "Pull all information from Redump (requires --username and --password)"); private const string _scanName = "scan"; internal readonly FlagInput ScanInput = new(_scanName, ["-s", "--scan"], "Enable copy protection scan (requires --path)"); @@ -71,6 +74,9 @@ namespace MPF.Check.Features private const string _useName = "use"; internal readonly StringInput UseInput = new(_useName, ["-u", "--use"], "Override configured dumping program name"); + private const string _usernameName = "username"; + internal readonly StringInput UsernameInput = new(_usernameName, ["-U", "--username"], "Redump username (incompatible with --no-retrieve)"); + private const string _zipName = "zip"; internal readonly FlagInput ZipInput = new(_zipName, ["-z", "--zip"], "Enable log file compression"); @@ -189,6 +195,14 @@ namespace MPF.Check.Features index += 2; } + // Redump username + else if (UsernameInput.ProcessInput(args, ref index)) + Options.RedumpUsername = UsernameInput.Value; + + // Redump password + else if (PasswordInput.ProcessInput(args, ref index)) + Options.RedumpPassword = PasswordInput.Value; + // Pull all information (requires Redump login) else if (PullAllInput.ProcessInput(args, ref index)) Options.PullAllInformation = true; diff --git a/MPF.Check/Program.cs b/MPF.Check/Program.cs index 717292d5..5507dec0 100644 --- a/MPF.Check/Program.cs +++ b/MPF.Check/Program.cs @@ -118,7 +118,8 @@ namespace MPF.Check commandSet.Add(mainFeature.NoPlaceholdersInput); commandSet.Add(mainFeature.CreateIrdInput); commandSet.Add(mainFeature.NoRetrieveInput); - // TODO: Figure out how to work with the credentials input + commandSet.Add(mainFeature.UsernameInput); + commandSet.Add(mainFeature.PasswordInput); commandSet.Add(mainFeature.PullAllInput); commandSet.Add(mainFeature.PathInput); commandSet.Add(mainFeature.ScanInput);