Add Aaru log file paths, remove TODO in DIC

This commit is contained in:
Matt Nadareski
2021-04-02 21:56:14 -07:00
parent ad5cd5b8f9
commit 096a8a6a06
2 changed files with 42 additions and 1 deletions

View File

@@ -1033,6 +1033,48 @@ namespace MPF.Aaru
/// <inheritdoc/>
public override string GetDefaultExtension(MediaType? mediaType) => Converters.Extension(mediaType);
/// <inheritdoc/>
public override List<string> GetLogFilePaths(string basePath)
{
List<string> logFiles = new List<string>();
switch (this.Type)
{
case MediaType.CDROM:
if (File.Exists($"{basePath}.cicm.xml"))
logFiles.Add($"{basePath}.cicm.xml");
if (File.Exists($"{basePath}.ibg"))
logFiles.Add($"{basePath}.ibg");
if (File.Exists($"{basePath}.log"))
logFiles.Add($"{basePath}.log");
if (File.Exists($"{basePath}.mhddlog.bin"))
logFiles.Add($"{basePath}.mhddlog.bin");
if (File.Exists($"{basePath}.resume.xml"))
logFiles.Add($"{basePath}.resume.xml");
if (File.Exists($"{basePath}.sub.log"))
logFiles.Add($"{basePath}.sub.log");
break;
case MediaType.DVD:
case MediaType.HDDVD:
case MediaType.BluRay:
if (File.Exists($"{basePath}.cicm.xml"))
logFiles.Add($"{basePath}.cicm.xml");
if (File.Exists($"{basePath}.ibg"))
logFiles.Add($"{basePath}.ibg");
if (File.Exists($"{basePath}.log"))
logFiles.Add($"{basePath}.log");
if (File.Exists($"{basePath}.mhddlog.bin"))
logFiles.Add($"{basePath}.mhddlog.bin");
if (File.Exists($"{basePath}.resume.xml"))
logFiles.Add($"{basePath}.resume.xml");
break;
}
return logFiles;
}
/// <inheritdoc/>
public override bool IsDumpingCommand()
{

View File

@@ -1225,7 +1225,6 @@ namespace MPF.DiscImageCreator
var currentFiles = Directory.GetFiles(Path.GetDirectoryName(basePath));
string cmdPath = currentFiles.FirstOrDefault(f => Regex.IsMatch(f, @"\d{8}T\d{6}"));
// TODO: Figure out how to get the filename for the former _cmd file...
List<string> logFiles = new List<string>();
switch (this.Type)
{