diff --git a/Aaru.Localization/UI.Designer.cs b/Aaru.Localization/UI.Designer.cs
index c21c6eeec..6dc5f54bc 100644
--- a/Aaru.Localization/UI.Designer.cs
+++ b/Aaru.Localization/UI.Designer.cs
@@ -11148,6 +11148,12 @@ namespace Aaru.Localization {
}
}
+ public static string Ignore_subchannels_during_analysis {
+ get {
+ return ResourceManager.GetString("Ignore_subchannels_during_analysis", resourceCulture);
+ }
+ }
+
public static string Resume_file_to_use_for_analysis {
get {
return ResourceManager.GetString("Resume_file_to_use_for_analysis", resourceCulture);
diff --git a/Aaru.Localization/UI.es.resx b/Aaru.Localization/UI.es.resx
index b377a7bb4..da4b732dd 100644
--- a/Aaru.Localization/UI.es.resx
+++ b/Aaru.Localization/UI.es.resx
@@ -5569,6 +5569,9 @@ Probadores:
Analiza sectores no volcados o dañados e informa de los archivos a los que afectan.
+
+ Ignora los subcanales dañados durante el análisis.
+
Archivo de reanudación a usar para el análisis.
diff --git a/Aaru.Localization/UI.resx b/Aaru.Localization/UI.resx
index bb0fae0d2..55643449d 100644
--- a/Aaru.Localization/UI.resx
+++ b/Aaru.Localization/UI.resx
@@ -5653,6 +5653,9 @@ Do you want to continue?
Analyzes undumped and damaged sectors and reports the files they affect.
+
+ Ignore damaged subchannels during analysis.
+
Resume file to use for the analysis.
diff --git a/Aaru/Commands/Image/Analyze.cs b/Aaru/Commands/Image/Analyze.cs
index c6fa2aa77..dcd619b76 100644
--- a/Aaru/Commands/Image/Analyze.cs
+++ b/Aaru/Commands/Image/Analyze.cs
@@ -70,13 +70,14 @@ sealed class AnalyzeCommand : Command
if(!parsedOptions.ContainsKey("debug")) parsedOptions.Add("debug", settings.Debug.ToString());
- AaruLogging.Debug(MODULE_NAME, "--debug={0}", settings.Debug);
- AaruLogging.Debug(MODULE_NAME, "--encoding={0}", Markup.Escape(settings.Encoding ?? ""));
- AaruLogging.Debug(MODULE_NAME, "--input={0}", Markup.Escape(settings.ImagePath ?? ""));
- AaruLogging.Debug(MODULE_NAME, "--namespace={0}", Markup.Escape(settings.Namespace ?? ""));
- AaruLogging.Debug(MODULE_NAME, "--options={0}", Markup.Escape(settings.Options ?? ""));
- AaruLogging.Debug(MODULE_NAME, "--resume-file={0}", Markup.Escape(settings.ResumeFile ?? ""));
- AaruLogging.Debug(MODULE_NAME, "--verbose={0}", settings.Verbose);
+ AaruLogging.Debug(MODULE_NAME, "--debug={0}", settings.Debug);
+ AaruLogging.Debug(MODULE_NAME, "--encoding={0}", Markup.Escape(settings.Encoding ?? ""));
+ AaruLogging.Debug(MODULE_NAME, "--input={0}", Markup.Escape(settings.ImagePath ?? ""));
+ AaruLogging.Debug(MODULE_NAME, "--namespace={0}", Markup.Escape(settings.Namespace ?? ""));
+ AaruLogging.Debug(MODULE_NAME, "--options={0}", Markup.Escape(settings.Options ?? ""));
+ AaruLogging.Debug(MODULE_NAME, "--resume-file={0}", Markup.Escape(settings.ResumeFile ?? ""));
+ AaruLogging.Debug(MODULE_NAME, "--ignore-subchannels={0}", settings.IgnoreSubchannels);
+ AaruLogging.Debug(MODULE_NAME, "--verbose={0}", settings.Verbose);
IFilter inputFilter = null;
@@ -179,7 +180,7 @@ sealed class AnalyzeCommand : Command
AaruLogging.WriteLine();
}
- List affectedExtents = GetAffectedExtents(baseImage, resume);
+ List affectedExtents = GetAffectedExtents(baseImage, resume, settings.IgnoreSubchannels);
if(affectedExtents.Count == 0)
{
@@ -345,7 +346,7 @@ sealed class AnalyzeCommand : Command
}
}
- static List GetAffectedExtents(IBaseImage image, Resume resume)
+ static List GetAffectedExtents(IBaseImage image, Resume resume, bool ignoreSubchannels)
{
List affected = [];
ulong totalSectors = image.Info.Sectors;
@@ -364,8 +365,11 @@ sealed class AnalyzeCommand : Command
foreach((ulong start, ulong end) extent in badSectors)
affected.Add(new AffectedExtent(AffectedSectorKind.Error, extent.start, extent.end));
- foreach((ulong start, ulong end) extent in subchannelSectors)
- affected.Add(new AffectedExtent(AffectedSectorKind.Subchannel, extent.start, extent.end));
+ if(!ignoreSubchannels)
+ {
+ foreach((ulong start, ulong end) extent in subchannelSectors)
+ affected.Add(new AffectedExtent(AffectedSectorKind.Subchannel, extent.start, extent.end));
+ }
if(dumpedExtents.Count > 0)
{
@@ -762,9 +766,7 @@ sealed class AnalyzeCommand : Command
ColorizeCell(file.Stream ?? string.Empty, fileKind));
}
else
- {
table.AddRow(ColorizeCell(file.Path ?? string.Empty, fileKind), ColorizeCell(extents, fileKind));
- }
}
AnsiConsole.Write(table);
@@ -919,6 +921,9 @@ sealed class AnalyzeCommand : Command
[CommandOption("-n|--namespace")]
[DefaultValue(null)]
public string Namespace { get; init; }
+ [LocalizedDescription(nameof(UI.Ignore_subchannels_during_analysis))]
+ [CommandOption("--ignore-subchannel|--ignore-subchannels")]
+ public bool IgnoreSubchannels { get; init; }
[LocalizedDescription(nameof(UI.Resume_file_to_use_for_analysis))]
[CommandOption("-r|--resume-file")]
[DefaultValue(null)]