mirror of
https://github.com/SabreTools/MPF.git
synced 2026-07-02 17:24:48 +00:00
Implement file merging in CleanRip
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
- Add BCA to list of files to select in Check UI
|
||||
- Move Zstd compression helper to base processor
|
||||
- Add file merge method in CleanRip
|
||||
- Implement file merging in CleanRip
|
||||
|
||||
### 3.5.0 (2025-10-10)
|
||||
|
||||
|
||||
@@ -38,6 +38,9 @@ namespace MPF.Processors
|
||||
// TODO: Determine if there's a CleanRip version anywhere
|
||||
info.DumpingInfo!.DumpingDate = ProcessingTool.GetFileModifiedDate($"{basePath}-dumpinfo.txt")?.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
// Try to merge parts together, if needed
|
||||
_ = MergeFileParts(basePath);
|
||||
|
||||
// Get the Datafile information
|
||||
var datafile = GenerateCleanripDatafile($"{basePath}.iso", $"{basePath}-dumpinfo.txt");
|
||||
info.TracksAndWriteOffsets!.ClrMameProData = ProcessingTool.GenerateDatfile(datafile);
|
||||
@@ -103,6 +106,10 @@ namespace MPF.Processors
|
||||
/// <remarks>This assumes that all file parts are named like $"{basePath}.part{i}.iso"</remarks>
|
||||
internal static string? MergeFileParts(string basePath)
|
||||
{
|
||||
// If the expected output already exists
|
||||
if (File.Exists($"{basePath}.iso"))
|
||||
return $"{basePath}.iso";
|
||||
|
||||
// If the first part does not exist
|
||||
if (!File.Exists($"{basePath}.part0.iso"))
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user