Report specific DIC version, if possible

This commit is contained in:
Matt Nadareski
2022-10-06 10:04:56 -07:00
parent a479b16ae2
commit a72b3c32b1
2 changed files with 5 additions and 5 deletions

View File

@@ -132,6 +132,7 @@
- Use default directory for folder browsing, if possible
- Add unused command filename parser
- Add initial framework for reporting dumping program
- Report specific DIC version, if possible
### 2.3 (2022-02-05)
- Start overhauling Redump information pulling, again

View File

@@ -375,8 +375,9 @@ namespace MPF.Modules.DiscImageCreator
{
string outputDirectory = Path.GetDirectoryName(basePath);
// TODO: Get the DiscImageCreator version
info.CommonDiscInfo.DumpingProgram = EnumConverter.LongName(this.InternalProgram);
// Get the dumping program and version
(_, string dicVersion) = GetCommandFilePathAndVersion(basePath);
info.CommonDiscInfo.DumpingProgram = $"{EnumConverter.LongName(this.InternalProgram)} {dicVersion ?? "Unknown Version"}";
// Fill in the hash data
info.TracksAndWriteOffsets.ClrMameProData = GetDatfile($"{basePath}.dat");
@@ -1489,9 +1490,7 @@ namespace MPF.Modules.DiscImageCreator
/// <inheritdoc/>
public override List<string> GetLogFilePaths(string basePath)
{
string parentDirectory = Path.GetDirectoryName(basePath);
var currentFiles = Directory.GetFiles(parentDirectory);
string cmdPath = currentFiles.FirstOrDefault(f => Regex.IsMatch(f, @"\d{8}T\d{6}"));
(string cmdPath, _) = GetCommandFilePathAndVersion(basePath);
List<string> logFiles = new List<string>();
switch (this.Type)