mirror of
https://github.com/SabreTools/MPF.git
synced 2026-07-02 17:24:48 +00:00
Relax PS3CFW output filename requirements (#848)
* Relax PS3CFW output filename requirements * don't use Linq * better regex * literal backslash * requested changes * fix * Update MPF.Processors/PS3CFW.cs Co-authored-by: Matt Nadareski <mnadareski@outlook.com> --------- Co-authored-by: Matt Nadareski <mnadareski@outlook.com>
This commit is contained in:
@@ -53,6 +53,7 @@
|
||||
- Add newlines to pkg info printing
|
||||
- Better audio-only check
|
||||
- Minor cleanup from last commit
|
||||
- Relax PS3CFW output filename requirements
|
||||
|
||||
### 3.3.0 (2025-01-03)
|
||||
|
||||
|
||||
@@ -61,6 +61,12 @@ namespace MPF.Processors
|
||||
getKeyPath = $"{basePath}.getkey.log";
|
||||
else if (File.Exists(Path.Combine(baseDir, "getkey.log")))
|
||||
getKeyPath = Path.Combine(baseDir, "getkey.log");
|
||||
else
|
||||
{
|
||||
string[] getKeyFiles = Directory.GetFiles(baseDir, "*.getkey.log");
|
||||
if (getKeyFiles.Length > 0)
|
||||
getKeyPath = getKeyFiles[0];
|
||||
}
|
||||
|
||||
// Get dumping date from GetKey log date
|
||||
if (!string.IsNullOrEmpty(getKeyPath))
|
||||
@@ -71,6 +77,12 @@ namespace MPF.Processors
|
||||
info.Extras!.PIC = GetPIC($"{basePath}.disc.pic", 264);
|
||||
else if (File.Exists(Path.Combine(baseDir, "disc.pic")))
|
||||
info.Extras!.PIC = GetPIC(Path.Combine(baseDir, "disc.pic"), 264);
|
||||
else
|
||||
{
|
||||
string[] discPicFiles = Directory.GetFiles(baseDir, "*.disc.pic");
|
||||
if (discPicFiles.Length > 0)
|
||||
info.Extras!.PIC = GetPIC(discPicFiles[0], 264);
|
||||
}
|
||||
|
||||
// Parse Disc Key, Disc ID, and PIC from the getkey.log file
|
||||
if (ProcessingTool.ParseGetKeyLog(getKeyPath, out string? key, out string? id, out string? pic))
|
||||
@@ -96,11 +108,11 @@ namespace MPF.Processors
|
||||
return [
|
||||
new([$"{outputFilename}.iso", $"{outputFilename}.ISO"], OutputFileFlags.Required),
|
||||
new([$"{outputFilename}.cue", $"{outputFilename}.CUE"], OutputFileFlags.Zippable),
|
||||
new([$"{outputFilename}.getkey.log", "getkey.log"], OutputFileFlags.Required
|
||||
new RegexOutputFile($"getkey\\.log$", OutputFileFlags.Required
|
||||
| OutputFileFlags.Artifact
|
||||
| OutputFileFlags.Zippable,
|
||||
"getkey_log"),
|
||||
new([$"{outputFilename}.disc.pic", "disc.pic"], OutputFileFlags.Required
|
||||
new RegexOutputFile($"disc\\.pic$", OutputFileFlags.Required
|
||||
| OutputFileFlags.Binary
|
||||
| OutputFileFlags.Zippable,
|
||||
"disc_pic"),
|
||||
|
||||
@@ -165,7 +165,7 @@ namespace MPF.Processors
|
||||
| OutputFileFlags.Binary
|
||||
| OutputFileFlags.Zippable,
|
||||
"dmi"),
|
||||
new RegexOutputFile("[lL]og.txt", OutputFileFlags.Required
|
||||
new RegexOutputFile("[lL]og\\.txt", OutputFileFlags.Required
|
||||
| OutputFileFlags.Artifact
|
||||
| OutputFileFlags.Zippable,
|
||||
"log"),
|
||||
|
||||
Reference in New Issue
Block a user