diff --git a/CHANGELIST.md b/CHANGELIST.md index c7d9cf69..dda53c62 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -71,6 +71,7 @@ - Update Portuguese translation - Compress fixed SS - Only print BCA for nintendo dumps +- Update packages ### 3.6.0 (2025-11-28) diff --git a/MPF.ExecutionContexts.Test/MPF.ExecutionContexts.Test.csproj b/MPF.ExecutionContexts.Test/MPF.ExecutionContexts.Test.csproj index 58970bd1..994c6882 100644 --- a/MPF.ExecutionContexts.Test/MPF.ExecutionContexts.Test.csproj +++ b/MPF.ExecutionContexts.Test/MPF.ExecutionContexts.Test.csproj @@ -14,8 +14,8 @@ - - + + diff --git a/MPF.Frontend.Test/MPF.Frontend.Test.csproj b/MPF.Frontend.Test/MPF.Frontend.Test.csproj index 596f4354..3e461427 100644 --- a/MPF.Frontend.Test/MPF.Frontend.Test.csproj +++ b/MPF.Frontend.Test/MPF.Frontend.Test.csproj @@ -14,8 +14,8 @@ - - + + diff --git a/MPF.Frontend/MPF.Frontend.csproj b/MPF.Frontend/MPF.Frontend.csproj index 4e2c8791..8536fbc8 100644 --- a/MPF.Frontend/MPF.Frontend.csproj +++ b/MPF.Frontend/MPF.Frontend.csproj @@ -31,8 +31,8 @@ - - + + diff --git a/MPF.Processors.Test/MPF.Processors.Test.csproj b/MPF.Processors.Test/MPF.Processors.Test.csproj index 9197591d..61774f77 100644 --- a/MPF.Processors.Test/MPF.Processors.Test.csproj +++ b/MPF.Processors.Test/MPF.Processors.Test.csproj @@ -24,8 +24,8 @@ - - + + diff --git a/MPF.Processors/Aaru.cs b/MPF.Processors/Aaru.cs index f6b1ba50..ded76c12 100644 --- a/MPF.Processors/Aaru.cs +++ b/MPF.Processors/Aaru.cs @@ -16,7 +16,7 @@ using Schemas; #if NET462_OR_GREATER || NETCOREAPP using SharpCompress.Archives; using SharpCompress.Archives.Zip; -using SharpCompress.Common; +using SharpCompress.Readers; #endif #pragma warning disable CS0618 // Ignore "Type or member is obsolete" @@ -54,10 +54,10 @@ namespace MPF.Processors ZipArchive? logArchive = null; try { - logArchive = ZipArchive.Open($"{basePath}_logs.zip"); + logArchive = (ZipArchive)ZipArchive.OpenArchive($"{basePath}_logs.zip", new ReaderOptions { ExtractFullPath = false, Overwrite = true}); string sidecarName = $"{Path.GetFileNameWithoutExtension(outputFilename)}.cicm.xml"; var sidecarEntry = logArchive.Entries.FirstOrDefault(e => e.Key == sidecarName && !e.IsDirectory); - sidecarEntry?.WriteToFile(sidecarPath, new ExtractionOptions { ExtractFullPath = false, Overwrite = true }); + sidecarEntry?.WriteToFile(sidecarPath); } catch { } diff --git a/MPF.Processors/BaseProcessor.cs b/MPF.Processors/BaseProcessor.cs index a90ae5c9..2adcca1c 100644 --- a/MPF.Processors/BaseProcessor.cs +++ b/MPF.Processors/BaseProcessor.cs @@ -130,7 +130,7 @@ namespace MPF.Processors bool disposed = false; try { - zf = ZipArchive.Create(); + zf = (ZipArchive)ZipArchive.CreateArchive(); List successful = AddToArchive(zf, zippableFiles, outputDirectory); _ = AddToArchive(zf, generatedFiles, outputDirectory); @@ -141,7 +141,7 @@ namespace MPF.Processors zf.SaveTo(archiveName, new ZipWriterOptions(CompressionType.Deflate, CompressionLevel.BestCompression) { UseZip64 = true }); break; case LogCompression.Zstd19: - zf.SaveTo(archiveName, new ZipWriterOptions(CompressionType.ZStandard, (CompressionLevel)19) { UseZip64 = true, CompressionBufferSize = 0x20000 }); + zf.SaveTo(archiveName, new ZipWriterOptions(CompressionType.ZStandard, (CompressionLevel)19) { UseZip64 = true }); break; case LogCompression.DeflateDefault: default: @@ -248,7 +248,7 @@ namespace MPF.Processors try { // Try to open the archive - logArchive = ZipArchive.Open($"{basePath}_logs.zip"); + logArchive = (ZipArchive)ZipArchive.OpenArchive($"{basePath}_logs.zip"); } catch { @@ -325,7 +325,7 @@ namespace MPF.Processors ZipArchive? logArchive = null; try { - logArchive = ZipArchive.Open($"{basePath}_logs.zip"); + logArchive = (ZipArchive)ZipArchive.OpenArchive($"{basePath}_logs.zip"); foreach (var outputFile in outputFiles) { outputFile.Extract(logArchive, outputDirectory ?? string.Empty); diff --git a/MPF.Processors/DiscImageCreator.cs b/MPF.Processors/DiscImageCreator.cs index fd796abe..dd5719b3 100644 --- a/MPF.Processors/DiscImageCreator.cs +++ b/MPF.Processors/DiscImageCreator.cs @@ -12,7 +12,7 @@ using SabreTools.RedumpLib.Data; #if NET462_OR_GREATER || NETCOREAPP using SharpCompress.Archives; using SharpCompress.Archives.Zip; -using SharpCompress.Common; +using SharpCompress.Readers; #endif /* @@ -94,10 +94,10 @@ namespace MPF.Processors ZipArchive? logArchive = null; try { - logArchive = ZipArchive.Open($"{basePath}_logs.zip"); + logArchive = (ZipArchive)ZipArchive.OpenArchive($"{basePath}_logs.zip", new ReaderOptions { ExtractFullPath = false, Overwrite = true}); string discName = $"{Path.GetFileNameWithoutExtension(outputFilename)}_disc.txt"; var discEntry = logArchive.Entries.FirstOrDefault(e => e.Key == discName && !e.IsDirectory); - discEntry?.WriteToFile(discPath, new ExtractionOptions { ExtractFullPath = false, Overwrite = true }); + discEntry?.WriteToFile(discPath); } catch { } @@ -342,7 +342,7 @@ namespace MPF.Processors if (File.Exists($"{basePath}_suppl.dat")) { var suppl = ProcessingTool.GetDatafile($"{basePath}_suppl.dat"); - if (GetXGDAuxHashInfo(suppl, out var xgd1DMIHash, out var xgd1PFIHash, out var xgd1SSHash)) + if (GetXGDAuxHashInfo(suppl, out var xgd1DMIHash, out var xgd1PFIHash, out _)) { info.CommonDiscInfo.CommentsSpecialFields[SiteCode.DMIHash] = xgd1DMIHash ?? string.Empty; info.CommonDiscInfo.CommentsSpecialFields[SiteCode.PFIHash] = xgd1PFIHash ?? string.Empty; @@ -357,7 +357,7 @@ namespace MPF.Processors } else { - if (GetXGDAuxInfo($"{basePath}_disc.txt", out var xgd1DMIHash, out var xgd1PFIHash, out var xgd1SSHash, out var xgd1SS)) + if (GetXGDAuxInfo($"{basePath}_disc.txt", out var xgd1DMIHash, out var xgd1PFIHash, out _, out var xgd1SS)) { info.CommonDiscInfo.CommentsSpecialFields[SiteCode.DMIHash] = xgd1DMIHash ?? string.Empty; info.CommonDiscInfo.CommentsSpecialFields[SiteCode.PFIHash] = xgd1PFIHash ?? string.Empty; @@ -407,7 +407,7 @@ namespace MPF.Processors if (File.Exists($"{basePath}_suppl.dat")) { var suppl = ProcessingTool.GetDatafile($"{basePath}_suppl.dat"); - if (GetXGDAuxHashInfo(suppl, out var xgd23DMIHash, out var xgd23PFIHash, out var xgd23SSHash)) + if (GetXGDAuxHashInfo(suppl, out var xgd23DMIHash, out var xgd23PFIHash, out _)) { info.CommonDiscInfo.CommentsSpecialFields[SiteCode.DMIHash] = xgd23DMIHash ?? string.Empty; info.CommonDiscInfo.CommentsSpecialFields[SiteCode.PFIHash] = xgd23PFIHash ?? string.Empty; @@ -422,7 +422,7 @@ namespace MPF.Processors } else { - if (GetXGDAuxInfo($"{basePath}_disc.txt", out var xgd23DMIHash, out var xgd23PFIHash, out var xgd23SSHash, out var xgd23SS)) + if (GetXGDAuxInfo($"{basePath}_disc.txt", out var xgd23DMIHash, out var xgd23PFIHash, out _, out var xgd23SS)) { info.CommonDiscInfo.CommentsSpecialFields[SiteCode.DMIHash] = xgd23DMIHash ?? string.Empty; info.CommonDiscInfo.CommentsSpecialFields[SiteCode.PFIHash] = xgd23PFIHash ?? string.Empty; @@ -2307,8 +2307,8 @@ namespace MPF.Processors continue; } - if (volLabels.ContainsKey(label)) - volLabels[label].Add(volType); + if (volLabels.TryGetValue(label, out List? value)) + value.Add(volType); else volLabels.Add(label, [volType]); diff --git a/MPF.Processors/MPF.Processors.csproj b/MPF.Processors/MPF.Processors.csproj index d449ed03..afc5aeec 100644 --- a/MPF.Processors/MPF.Processors.csproj +++ b/MPF.Processors/MPF.Processors.csproj @@ -32,12 +32,12 @@ - - - + + + - - + + \ No newline at end of file diff --git a/MPF.Processors/Redumper.cs b/MPF.Processors/Redumper.cs index 6d56bc1b..0b2fa3d5 100644 --- a/MPF.Processors/Redumper.cs +++ b/MPF.Processors/Redumper.cs @@ -12,7 +12,7 @@ using SabreTools.RedumpLib.Data; #if NET462_OR_GREATER || NETCOREAPP using SharpCompress.Archives; using SharpCompress.Archives.Zip; -using SharpCompress.Common; +using SharpCompress.Readers; #endif namespace MPF.Processors @@ -47,10 +47,10 @@ namespace MPF.Processors ZipArchive? logArchive = null; try { - logArchive = ZipArchive.Open($"{basePath}_logs.zip"); + logArchive = (ZipArchive)ZipArchive.OpenArchive($"{basePath}_logs.zip", new ReaderOptions { ExtractFullPath = false, Overwrite = true}); string logName = $"{Path.GetFileNameWithoutExtension(outputFilename)}.log"; var logEntry = logArchive.Entries.FirstOrDefault(e => e.Key == logName && !e.IsDirectory); - logEntry?.WriteToFile(logPath, new ExtractionOptions { ExtractFullPath = false, Overwrite = true }); + logEntry?.WriteToFile(logPath); } catch { } @@ -788,7 +788,7 @@ namespace MPF.Processors try { // Try to open the archive - using ZipArchive archive = ZipArchive.Open($"{basePath}_logs.zip"); + using ZipArchive archive = (ZipArchive)ZipArchive.OpenArchive($"{basePath}_logs.zip"); // Get the log entry and check it, if possible ZipArchiveEntry? logEntry = null; @@ -2939,8 +2939,8 @@ namespace MPF.Processors if (label is null || label.Length <= 0) break; - if (volLabels.ContainsKey(label)) - volLabels[label].Add("ISO"); + if (volLabels.TryGetValue(label, out List? value)) + value.Add("ISO"); else volLabels[label] = ["ISO"];