Skip to content

Support reparsing of MPF-processed outputs#896

Merged
mnadareski merged 10 commits intoSabreTools:masterfrom
Deterous:master
Oct 11, 2025
Merged

Support reparsing of MPF-processed outputs#896
mnadareski merged 10 commits intoSabreTools:masterfrom
Deterous:master

Conversation

@Deterous
Copy link
Member

@Deterous Deterous commented Oct 10, 2025

Unzips all detected output files in an existing log zip, so that a 2nd log zip can be created.
Fixes #844

Also tweaks the required redumper files: fulltoc and scram no longer required.
Some drives cant do fulltoc, and we should support case where dumper already deleted scram.

Also fixes Check UI issue where message about missing files is eaten.

basePath = Path.Combine(outputDirectory, basePath);

// Extract sidecar from archive, if it is zipped
#if NET462_OR_GREATER || NETCOREAPP
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels odd to have both the single-file extraction in each processor alongside the extraction of the entire log zip, if needed. Is there a case where the code will get into the processor and it either hasn't come from a normal dumping run or Check invocation?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

single file is needed first for media detection

/// <param name="outputFilename">Output filename to use as the base path</param>
/// <remarks>Assumes filename has an extension</remarks>
#if NET462_OR_GREATER || NETCOREAPP
public void ExtractFromLogs(MediaType? mediaType, string? outputDirectory, string outputFilename)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's something odd with the order of operations in this method. It looks like it would work correctly, but it seems like it's doing things it doesn't need to.

return;

// Extract all found output files from the archive
foreach (var outputFile in outputFiles)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think instead of trying to be picky about what's extracted, we can just extract the whole thing in one go. I would be open to hearing what the rationale was behind using only the list of output files, though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means that there will never be any files left in the folder that are not re-zipped

@mnadareski
Copy link
Collaborator

The failing test is MPF.Processors.Test.RedumperTests.FoundAllFiles_Invalid_Filled. It just needs a "7" changed to a "5" because of the two required flags being removed.

@mnadareski mnadareski merged commit c5e01b9 into SabreTools:master Oct 11, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Request] Support reparsing of MPF-processed outputs

2 participants