mirror of
https://github.com/SabreTools/MPF.git
synced 2026-07-02 17:24:48 +00:00
Non-dumping commands shouldn't cause issues
This commit is contained in:
@@ -783,6 +783,22 @@ namespace DICUI.Utilities
|
||||
return string.Join(" ", parameters);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets if the current command is considered a dumping command or not
|
||||
/// </summary>
|
||||
/// <returns>True if it's a dumping command, false otherwise</returns>
|
||||
public bool IsDumpingCommand()
|
||||
{
|
||||
switch (Command)
|
||||
{
|
||||
case ChefCommand.MediaDump:
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns if the current Parameter object is valid
|
||||
/// </summary>
|
||||
|
||||
@@ -616,6 +616,35 @@ namespace DICUI.Utilities
|
||||
return string.Join(" ", parameters);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets if the current command is considered a dumping command or not
|
||||
/// </summary>
|
||||
/// <returns>True if it's a dumping command, false otherwise</returns>
|
||||
public bool IsDumpingCommand()
|
||||
{
|
||||
switch (Command)
|
||||
{
|
||||
case CreatorCommand.Audio:
|
||||
case CreatorCommand.BluRay:
|
||||
case CreatorCommand.CompactDisc:
|
||||
case CreatorCommand.Data:
|
||||
case CreatorCommand.DigitalVideoDisc:
|
||||
case CreatorCommand.Disk:
|
||||
case CreatorCommand.Floppy:
|
||||
case CreatorCommand.GDROM:
|
||||
case CreatorCommand.SACD:
|
||||
case CreatorCommand.Swap:
|
||||
case CreatorCommand.XBOX:
|
||||
case CreatorCommand.XBOXSwap:
|
||||
case CreatorCommand.XGD2Swap:
|
||||
case CreatorCommand.XGD3Swap:
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns if the current Parameter object is valid
|
||||
/// </summary>
|
||||
|
||||
@@ -419,9 +419,9 @@ namespace DICUI.Utilities
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Execute a complete dump workflow
|
||||
/// Execute the initial invocation of the dumping programs
|
||||
/// </summary>
|
||||
public async Task<Result> StartDumping(IProgress<Result> progress)
|
||||
public async Task<Result> Run(IProgress<Result> progress)
|
||||
{
|
||||
Result result = IsValidForDump();
|
||||
|
||||
|
||||
@@ -550,7 +550,23 @@ namespace DICUI.Windows
|
||||
|
||||
var progress = new Progress<Result>();
|
||||
progress.ProgressChanged += ProgressUpdated;
|
||||
Result result = await _env.StartDumping(progress);
|
||||
Result result = await _env.Run(progress);
|
||||
|
||||
// If we didn't execute a dumping command we cannot get submission output
|
||||
bool isDumpingCommand = false;
|
||||
if (_env.UseChef)
|
||||
isDumpingCommand = _env.ChefParameters.IsDumpingCommand();
|
||||
else
|
||||
isDumpingCommand = _env.CreatorParameters.IsDumpingCommand();
|
||||
|
||||
if (!isDumpingCommand)
|
||||
{
|
||||
ViewModels.LoggerViewModel.VerboseLogLn("No dumping command was run, submission information will not be gathered.");
|
||||
StatusLabel.Content = "Execution complete!";
|
||||
StartStopButton.Content = Constants.StartDumping;
|
||||
CopyProtectScanButton.IsEnabled = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (result)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user