diff --git a/MPF.Library/Aaru/Parameters.cs b/MPF.Library/Aaru/Parameters.cs
index e400061d..e3f852de 100644
--- a/MPF.Library/Aaru/Parameters.cs
+++ b/MPF.Library/Aaru/Parameters.cs
@@ -205,7 +205,7 @@ namespace MPF.Aaru
}
///
- public override void GenerateSubmissionInfo(SubmissionInfo info, string basePath, Drive drive)
+ public override void GenerateSubmissionInfo(SubmissionInfo info, string basePath, Drive drive, bool includeArtifacts)
{
// TODO: Fill in submission info specifics for Aaru
string outputDirectory = Path.GetDirectoryName(basePath);
@@ -365,19 +365,22 @@ namespace MPF.Aaru
break;
}
- // Fill in any artifacts that exist, Base64-encoded
- if (File.Exists(basePath + ".cicm.xml"))
- info.Artifacts["cicm"] = GetBase64(GetFullFile(basePath + ".cicm.xml"));
- if (File.Exists(basePath + ".ibg"))
- info.Artifacts["ibg"] = Convert.ToBase64String(File.ReadAllBytes(basePath + ".ibg"));
- if (File.Exists(basePath + ".log"))
- info.Artifacts["log"] = GetBase64(GetFullFile(basePath + ".log"));
- if (File.Exists(basePath + ".mhddlog.bin"))
- info.Artifacts["mhddlog_bin"] = Convert.ToBase64String(File.ReadAllBytes(basePath + ".mhddlog.bin"));
- if (File.Exists(basePath + ".resume.xml"))
- info.Artifacts["resume"] = GetBase64(GetFullFile(basePath + ".resume.xml"));
- if (File.Exists(basePath + ".sub.log"))
- info.Artifacts["sub_log"] = GetBase64(GetFullFile(basePath + ".sub.log"));
+ // Fill in any artifacts that exist, Base64-encoded, if we need to
+ if (includeArtifacts)
+ {
+ if (File.Exists(basePath + ".cicm.xml"))
+ info.Artifacts["cicm"] = GetBase64(GetFullFile(basePath + ".cicm.xml"));
+ if (File.Exists(basePath + ".ibg"))
+ info.Artifacts["ibg"] = Convert.ToBase64String(File.ReadAllBytes(basePath + ".ibg"));
+ if (File.Exists(basePath + ".log"))
+ info.Artifacts["log"] = GetBase64(GetFullFile(basePath + ".log"));
+ if (File.Exists(basePath + ".mhddlog.bin"))
+ info.Artifacts["mhddlog_bin"] = Convert.ToBase64String(File.ReadAllBytes(basePath + ".mhddlog.bin"));
+ if (File.Exists(basePath + ".resume.xml"))
+ info.Artifacts["resume"] = GetBase64(GetFullFile(basePath + ".resume.xml"));
+ if (File.Exists(basePath + ".sub.log"))
+ info.Artifacts["sub_log"] = GetBase64(GetFullFile(basePath + ".sub.log"));
+ }
}
///
diff --git a/MPF.Library/CleanRIp/Parameters.cs b/MPF.Library/CleanRIp/Parameters.cs
index 3a57a5f5..c9ce3006 100644
--- a/MPF.Library/CleanRIp/Parameters.cs
+++ b/MPF.Library/CleanRIp/Parameters.cs
@@ -54,7 +54,7 @@ namespace MPF.CleanRip
}
///
- public override void GenerateSubmissionInfo(SubmissionInfo info, string basePath, Drive drive)
+ public override void GenerateSubmissionInfo(SubmissionInfo info, string basePath, Drive drive, bool includeArtifacts)
{
info.TracksAndWriteOffsets.ClrMameProData = GetCleanripDatfile(basePath + ".iso", basePath + "-dumpinfo.txt");
@@ -89,11 +89,14 @@ namespace MPF.CleanRip
break;
}
- // Fill in any artifacts that exist, Base64-encoded
- if (File.Exists(basePath + ".bca"))
- info.Artifacts["bca"] = GetBase64(GetFullFile(basePath + ".bca", binary: true));
- if (File.Exists(basePath + "-dumpinfo.txt"))
- info.Artifacts["dumpinfo"] = GetBase64(GetFullFile(basePath + "-dumpinfo.txt"));
+ // Fill in any artifacts that exist, Base64-encoded, if we need to
+ if (includeArtifacts)
+ {
+ if (File.Exists(basePath + ".bca"))
+ info.Artifacts["bca"] = GetBase64(GetFullFile(basePath + ".bca", binary: true));
+ if (File.Exists(basePath + "-dumpinfo.txt"))
+ info.Artifacts["dumpinfo"] = GetBase64(GetFullFile(basePath + "-dumpinfo.txt"));
+ }
}
#endregion
diff --git a/MPF.Library/DD/Parameters.cs b/MPF.Library/DD/Parameters.cs
index 5eff05b0..bf102d11 100644
--- a/MPF.Library/DD/Parameters.cs
+++ b/MPF.Library/DD/Parameters.cs
@@ -101,7 +101,7 @@ namespace MPF.DD
}
///
- public override void GenerateSubmissionInfo(SubmissionInfo info, string basePath, Drive drive)
+ public override void GenerateSubmissionInfo(SubmissionInfo info, string basePath, Drive drive, bool includeArtifacts)
{
// TODO: Fill in submission info specifics for DD
string outputDirectory = Path.GetDirectoryName(basePath);
diff --git a/MPF.Library/Data/BaseParameters.cs b/MPF.Library/Data/BaseParameters.cs
index 51b74b3c..50942936 100644
--- a/MPF.Library/Data/BaseParameters.cs
+++ b/MPF.Library/Data/BaseParameters.cs
@@ -123,7 +123,8 @@ namespace MPF.Data
/// Base submission info to fill in specifics for
/// Base filename and path to use for checking
/// Drive representing the disc to get information from
- public abstract void GenerateSubmissionInfo(SubmissionInfo submissionInfo, string basePath, Drive drive);
+ /// True to include output files as encoded artifacts, false otherwise
+ public abstract void GenerateSubmissionInfo(SubmissionInfo submissionInfo, string basePath, Drive drive, bool includeArtifacts);
#endregion
diff --git a/MPF.Library/Data/DumpEnvironment.cs b/MPF.Library/Data/DumpEnvironment.cs
index f45f68ef..8d34f22d 100644
--- a/MPF.Library/Data/DumpEnvironment.cs
+++ b/MPF.Library/Data/DumpEnvironment.cs
@@ -601,7 +601,7 @@ namespace MPF.Data
};
// Get specific tool output handling
- Parameters.GenerateSubmissionInfo(info, combinedBase, this.Drive);
+ Parameters.GenerateSubmissionInfo(info, combinedBase, this.Drive, Options.OutputSubmissionJSON);
// Get a list of matching IDs for each line in the DAT
if (!string.IsNullOrEmpty(info.TracksAndWriteOffsets.ClrMameProData) && Options.HasRedumpLogin)
diff --git a/MPF.Library/DiscImageCreator/Parameters.cs b/MPF.Library/DiscImageCreator/Parameters.cs
index 8b56012d..7f5f9bcb 100644
--- a/MPF.Library/DiscImageCreator/Parameters.cs
+++ b/MPF.Library/DiscImageCreator/Parameters.cs
@@ -354,7 +354,7 @@ namespace MPF.DiscImageCreator
}
///
- public override void GenerateSubmissionInfo(SubmissionInfo info, string basePath, Drive drive)
+ public override void GenerateSubmissionInfo(SubmissionInfo info, string basePath, Drive drive, bool includeArtifacts)
{
string outputDirectory = Path.GetDirectoryName(basePath);
@@ -708,53 +708,56 @@ namespace MPF.DiscImageCreator
break;
}
- // Fill in any artifacts that exist, Base64-encoded
- //if (File.Exists(basePath + ".c2"))
- // info.Artifacts["c2"] = Convert.ToBase64String(File.ReadAllBytes(basePath + ".c2"));
- if (File.Exists(basePath + "_c2Error.txt"))
- info.Artifacts["c2Error"] = GetBase64(GetFullFile(basePath + "_c2Error.txt"));
- if (File.Exists(basePath + ".ccd"))
- info.Artifacts["ccd"] = GetBase64(GetFullFile(basePath + ".ccd"));
- if (File.Exists(basePath + "_cmd.txt")) // TODO: Figure out how to read in the timestamp-named file
- info.Artifacts["cmd"] = GetBase64(GetFullFile(basePath + "_cmd.txt"));
- if (File.Exists(basePath + ".cue"))
- info.Artifacts["cue"] = GetBase64(GetFullFile(basePath + ".cue"));
- if (File.Exists(basePath + ".dat"))
- info.Artifacts["dat"] = GetBase64(GetFullFile(basePath + ".dat"));
- if (File.Exists(basePath + "_disc.txt"))
- info.Artifacts["disc"] = GetBase64(GetFullFile(basePath + "_disc.txt"));
- //if (File.Exists(Path.Combine(outputDirectory, "DMI.bin")))
- // info.Artifacts["dmi"] = Convert.ToBase64String(File.ReadAllBytes(Path.Combine(outputDirectory, "DMI.bin")));
- if (File.Exists(basePath + "_drive.txt"))
- info.Artifacts["drive"] = GetBase64(GetFullFile(basePath + "_drive.txt"));
- if (File.Exists(basePath + "_img.cue"))
- info.Artifacts["img_cue"] = GetBase64(GetFullFile(basePath + "_img.cue"));
- if (File.Exists(basePath + ".img_EdcEcc.txt"))
- info.Artifacts["img_EdcEcc"] = GetBase64(GetFullFile(basePath + ".img_EdcEcc.txt"));
- if (File.Exists(basePath + ".img_EccEdc.txt"))
- info.Artifacts["img_EdcEcc"] = GetBase64(GetFullFile(basePath + ".img_EccEdc.txt"));
- if (File.Exists(basePath + "_mainError.txt"))
- info.Artifacts["mainError"] = GetBase64(GetFullFile(basePath + "_mainError.txt"));
- if (File.Exists(basePath + "_mainInfo.txt"))
- info.Artifacts["mainInfo"] = GetBase64(GetFullFile(basePath + "_mainInfo.txt"));
- //if (File.Exists(Path.Combine(outputDirectory, "PFI.bin")))
- // info.Artifacts["pfi"] = Convert.ToBase64String(File.ReadAllBytes(Path.Combine(outputDirectory, "PFI.bin")));
- //if (File.Exists(Path.Combine(outputDirectory, "SS.bin")))
- // info.Artifacts["ss"] = Convert.ToBase64String(File.ReadAllBytes(Path.Combine(outputDirectory, "SS.bin")));
- if (File.Exists(basePath + ".sub"))
- info.Artifacts["sub"] = Convert.ToBase64String(File.ReadAllBytes(basePath + ".sub"));
- if (File.Exists(basePath + "_subError.txt"))
- info.Artifacts["subError"] = GetBase64(GetFullFile(basePath + "_subError.txt"));
- if (File.Exists(basePath + "_subInfo.txt"))
- info.Artifacts["subInfo"] = GetBase64(GetFullFile(basePath + "_subInfo.txt"));
- if (File.Exists(basePath + "_subIntention.txt"))
- info.Artifacts["subIntention"] = GetBase64(GetFullFile(basePath + "_subIntention.txt"));
- //if (File.Exists(basePath + "_sub.txt"))
- // info.Artifacts["subReadable"] = GetBase64(GetFullFile(basePath + "_sub.txt"));
- //if (File.Exists(basePath + "_subReadable.txt"))
- // info.Artifacts["subReadable"] = GetBase64(GetFullFile(basePath + "_subReadable.txt"));
- if (File.Exists(basePath + "_volDesc.txt"))
- info.Artifacts["volDesc"] = GetBase64(GetFullFile(basePath + "_volDesc.txt"));
+ // Fill in any artifacts that exist, Base64-encoded, if we need to
+ if (includeArtifacts)
+ {
+ //if (File.Exists(basePath + ".c2"))
+ // info.Artifacts["c2"] = Convert.ToBase64String(File.ReadAllBytes(basePath + ".c2"));
+ if (File.Exists(basePath + "_c2Error.txt"))
+ info.Artifacts["c2Error"] = GetBase64(GetFullFile(basePath + "_c2Error.txt"));
+ if (File.Exists(basePath + ".ccd"))
+ info.Artifacts["ccd"] = GetBase64(GetFullFile(basePath + ".ccd"));
+ if (File.Exists(basePath + "_cmd.txt")) // TODO: Figure out how to read in the timestamp-named file
+ info.Artifacts["cmd"] = GetBase64(GetFullFile(basePath + "_cmd.txt"));
+ if (File.Exists(basePath + ".cue"))
+ info.Artifacts["cue"] = GetBase64(GetFullFile(basePath + ".cue"));
+ if (File.Exists(basePath + ".dat"))
+ info.Artifacts["dat"] = GetBase64(GetFullFile(basePath + ".dat"));
+ if (File.Exists(basePath + "_disc.txt"))
+ info.Artifacts["disc"] = GetBase64(GetFullFile(basePath + "_disc.txt"));
+ //if (File.Exists(Path.Combine(outputDirectory, "DMI.bin")))
+ // info.Artifacts["dmi"] = Convert.ToBase64String(File.ReadAllBytes(Path.Combine(outputDirectory, "DMI.bin")));
+ if (File.Exists(basePath + "_drive.txt"))
+ info.Artifacts["drive"] = GetBase64(GetFullFile(basePath + "_drive.txt"));
+ if (File.Exists(basePath + "_img.cue"))
+ info.Artifacts["img_cue"] = GetBase64(GetFullFile(basePath + "_img.cue"));
+ if (File.Exists(basePath + ".img_EdcEcc.txt"))
+ info.Artifacts["img_EdcEcc"] = GetBase64(GetFullFile(basePath + ".img_EdcEcc.txt"));
+ if (File.Exists(basePath + ".img_EccEdc.txt"))
+ info.Artifacts["img_EdcEcc"] = GetBase64(GetFullFile(basePath + ".img_EccEdc.txt"));
+ if (File.Exists(basePath + "_mainError.txt"))
+ info.Artifacts["mainError"] = GetBase64(GetFullFile(basePath + "_mainError.txt"));
+ if (File.Exists(basePath + "_mainInfo.txt"))
+ info.Artifacts["mainInfo"] = GetBase64(GetFullFile(basePath + "_mainInfo.txt"));
+ //if (File.Exists(Path.Combine(outputDirectory, "PFI.bin")))
+ // info.Artifacts["pfi"] = Convert.ToBase64String(File.ReadAllBytes(Path.Combine(outputDirectory, "PFI.bin")));
+ //if (File.Exists(Path.Combine(outputDirectory, "SS.bin")))
+ // info.Artifacts["ss"] = Convert.ToBase64String(File.ReadAllBytes(Path.Combine(outputDirectory, "SS.bin")));
+ if (File.Exists(basePath + ".sub"))
+ info.Artifacts["sub"] = Convert.ToBase64String(File.ReadAllBytes(basePath + ".sub"));
+ if (File.Exists(basePath + "_subError.txt"))
+ info.Artifacts["subError"] = GetBase64(GetFullFile(basePath + "_subError.txt"));
+ if (File.Exists(basePath + "_subInfo.txt"))
+ info.Artifacts["subInfo"] = GetBase64(GetFullFile(basePath + "_subInfo.txt"));
+ if (File.Exists(basePath + "_subIntention.txt"))
+ info.Artifacts["subIntention"] = GetBase64(GetFullFile(basePath + "_subIntention.txt"));
+ //if (File.Exists(basePath + "_sub.txt"))
+ // info.Artifacts["subReadable"] = GetBase64(GetFullFile(basePath + "_sub.txt"));
+ //if (File.Exists(basePath + "_subReadable.txt"))
+ // info.Artifacts["subReadable"] = GetBase64(GetFullFile(basePath + "_subReadable.txt"));
+ if (File.Exists(basePath + "_volDesc.txt"))
+ info.Artifacts["volDesc"] = GetBase64(GetFullFile(basePath + "_volDesc.txt"));
+ }
}
///
diff --git a/MPF.Library/UmdImageCreator/Parameters.cs b/MPF.Library/UmdImageCreator/Parameters.cs
index bfc15154..8d1fd916 100644
--- a/MPF.Library/UmdImageCreator/Parameters.cs
+++ b/MPF.Library/UmdImageCreator/Parameters.cs
@@ -56,7 +56,7 @@ namespace MPF.UmdImageCreator
}
///
- public override void GenerateSubmissionInfo(SubmissionInfo info, string basePath, Drive drive)
+ public override void GenerateSubmissionInfo(SubmissionInfo info, string basePath, Drive drive, bool includeArtifacts)
{
// Extract info based generically on MediaType
switch (this.Type)
@@ -86,15 +86,18 @@ namespace MPF.UmdImageCreator
break;
}
- // Fill in any artifacts that exist, Base64-encoded
- if (File.Exists(basePath + "_disc.txt"))
- info.Artifacts["disc"] = GetBase64(GetFullFile(basePath + "_disc.txt"));
- if (File.Exists(basePath + "_mainError.txt"))
- info.Artifacts["mainError"] = GetBase64(GetFullFile(basePath + "_mainError.txt"));
- if (File.Exists(basePath + "_mainInfo.txt"))
- info.Artifacts["mainInfo"] = GetBase64(GetFullFile(basePath + "_mainInfo.txt"));
- if (File.Exists(basePath + "_volDesc.txt"))
- info.Artifacts["volDesc"] = GetBase64(GetFullFile(basePath + "_volDesc.txt"));
+ // Fill in any artifacts that exist, Base64-encoded, if we need to
+ if (includeArtifacts)
+ {
+ if (File.Exists(basePath + "_disc.txt"))
+ info.Artifacts["disc"] = GetBase64(GetFullFile(basePath + "_disc.txt"));
+ if (File.Exists(basePath + "_mainError.txt"))
+ info.Artifacts["mainError"] = GetBase64(GetFullFile(basePath + "_mainError.txt"));
+ if (File.Exists(basePath + "_mainInfo.txt"))
+ info.Artifacts["mainInfo"] = GetBase64(GetFullFile(basePath + "_mainInfo.txt"));
+ if (File.Exists(basePath + "_volDesc.txt"))
+ info.Artifacts["volDesc"] = GetBase64(GetFullFile(basePath + "_volDesc.txt"));
+ }
}
#endregion