mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
REFACTOR: Use preferred braces style.
This commit is contained in:
@@ -234,10 +234,7 @@ namespace DiscImageChef.Core
|
||||
|
||||
// If there is only one track, and it's the same as the image file (e.g. ".iso" files), don't re-checksum.
|
||||
if(image.PluginUuid == new System.Guid("12345678-AAAA-BBBB-CCCC-123456789000") &&
|
||||
filterId == new System.Guid("12345678-AAAA-BBBB-CCCC-123456789000"))
|
||||
{
|
||||
sidecar.BlockMedia[0].ContentChecksums = sidecar.BlockMedia[0].Checksums;
|
||||
}
|
||||
filterId == new System.Guid("12345678-AAAA-BBBB-CCCC-123456789000")) sidecar.BlockMedia[0].ContentChecksums = sidecar.BlockMedia[0].Checksums;
|
||||
else
|
||||
{
|
||||
Checksum contentChkWorker = new Checksum();
|
||||
@@ -593,14 +590,18 @@ namespace DiscImageChef.Core
|
||||
scpBlockTrackTypes.OrderBy(t => t.Cylinder).ThenBy(t => t.Head).ToArray();
|
||||
}
|
||||
else
|
||||
{
|
||||
DicConsole
|
||||
.ErrorWriteLine("SuperCardPro image do not contain same number of tracks ({0}) than disk image ({1}), ignoring...",
|
||||
scpImage.Header.end + 1, image.ImageInfo.Cylinders);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DicConsole
|
||||
.ErrorWriteLine("SuperCardPro image do not contain same number of heads ({0}) than disk image ({1}), ignoring...",
|
||||
2, image.ImageInfo.Heads);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -679,14 +680,18 @@ namespace DiscImageChef.Core
|
||||
kfBlockTrackTypes.OrderBy(t => t.Cylinder).ThenBy(t => t.Head).ToArray();
|
||||
}
|
||||
else
|
||||
{
|
||||
DicConsole
|
||||
.ErrorWriteLine("KryoFlux image do not contain same number of tracks ({0}) than disk image ({1}), ignoring...",
|
||||
kfImage.ImageInfo.Cylinders, image.ImageInfo.Cylinders);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DicConsole
|
||||
.ErrorWriteLine("KryoFluximage do not contain same number of heads ({0}) than disk image ({1}), ignoring...",
|
||||
kfImage.ImageInfo.Heads, image.ImageInfo.Heads);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -751,14 +756,18 @@ namespace DiscImageChef.Core
|
||||
dfiBlockTrackTypes.OrderBy(t => t.Cylinder).ThenBy(t => t.Head).ToArray();
|
||||
}
|
||||
else
|
||||
{
|
||||
DicConsole
|
||||
.ErrorWriteLine("DiscFerret image do not contain same number of tracks ({0}) than disk image ({1}), ignoring...",
|
||||
dfiImage.ImageInfo.Cylinders, image.ImageInfo.Cylinders);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DicConsole
|
||||
.ErrorWriteLine("DiscFerret image do not contain same number of heads ({0}) than disk image ({1}), ignoring...",
|
||||
dfiImage.ImageInfo.Heads, image.ImageInfo.Heads);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -75,7 +75,6 @@ namespace DiscImageChef.Core
|
||||
MediaType dskType = image.ImageInfo.MediaType;
|
||||
|
||||
foreach(MediaTagType tagType in image.ImageInfo.ReadableMediaTags)
|
||||
{
|
||||
switch(tagType)
|
||||
{
|
||||
case MediaTagType.CD_ATIP:
|
||||
@@ -87,10 +86,8 @@ namespace DiscImageChef.Core
|
||||
Decoders.CD.ATIP.CDATIP?
|
||||
atip = Decoders.CD.ATIP.Decode(image.ReadDiskTag(MediaTagType.CD_ATIP));
|
||||
if(atip.HasValue)
|
||||
{
|
||||
if(atip.Value.DDCD) dskType = atip.Value.DiscType ? MediaType.DDCDRW : MediaType.DDCDR;
|
||||
else dskType = atip.Value.DiscType ? MediaType.CDRW : MediaType.CDR;
|
||||
}
|
||||
break;
|
||||
case MediaTagType.DVD_BCA:
|
||||
sidecar.OpticalDisc[0].BCA = new DumpType
|
||||
@@ -115,7 +112,6 @@ namespace DiscImageChef.Core
|
||||
Decoders.DVD.CSS_CPRM.LeadInCopyright? cmi =
|
||||
Decoders.DVD.CSS_CPRM.DecodeLeadInCopyright(image.ReadDiskTag(MediaTagType.DVD_CMI));
|
||||
if(cmi.HasValue)
|
||||
{
|
||||
switch(cmi.Value.CopyrightType)
|
||||
{
|
||||
case Decoders.DVD.CopyrightType.AACS:
|
||||
@@ -128,7 +124,6 @@ namespace DiscImageChef.Core
|
||||
sidecar.OpticalDisc[0].CopyProtection = "CPRM";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
case MediaTagType.DVD_DMI:
|
||||
@@ -157,7 +152,6 @@ namespace DiscImageChef.Core
|
||||
Decoders.DVD.PFI.PhysicalFormatInformation? pfi =
|
||||
Decoders.DVD.PFI.Decode(image.ReadDiskTag(MediaTagType.DVD_PFI));
|
||||
if(pfi.HasValue)
|
||||
{
|
||||
if(dskType != MediaType.XGD && dskType != MediaType.XGD2 && dskType != MediaType.XGD3)
|
||||
{
|
||||
switch(pfi.Value.DiskCategory)
|
||||
@@ -219,7 +213,6 @@ namespace DiscImageChef.Core
|
||||
else if(pfi.Value.DiscSize == Decoders.DVD.DVDSize.OneTwenty)
|
||||
sidecar.OpticalDisc[0].Dimensions.Diameter = 120;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
case MediaTagType.CD_PMA:
|
||||
@@ -230,7 +223,6 @@ namespace DiscImageChef.Core
|
||||
};
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
@@ -297,10 +289,7 @@ namespace DiscImageChef.Core
|
||||
xmlTrk.StartSector = (long)trk.TrackStartSector;
|
||||
xmlTrk.EndSector = (long)trk.TrackEndSector;
|
||||
|
||||
if(trk.Indexes != null && trk.Indexes.ContainsKey(0))
|
||||
{
|
||||
if(trk.Indexes.TryGetValue(0, out ulong idx0)) xmlTrk.StartSector = (long)idx0;
|
||||
}
|
||||
if(trk.Indexes != null && trk.Indexes.ContainsKey(0)) if(trk.Indexes.TryGetValue(0, out ulong idx0)) xmlTrk.StartSector = (long)idx0;
|
||||
|
||||
if(sidecar.OpticalDisc[0].DiscType == "CD" || sidecar.OpticalDisc[0].DiscType == "GD")
|
||||
{
|
||||
@@ -333,10 +322,7 @@ namespace DiscImageChef.Core
|
||||
// Only if filter is none...
|
||||
(filterId == new System.Guid("12345678-AAAA-BBBB-CCCC-123456789000") ||
|
||||
// ...or AppleDouble
|
||||
filterId == new System.Guid("1b2165ee-c9df-4b21-bbbb-9e5892b2df4d")))
|
||||
{
|
||||
xmlTrk.Checksums = sidecar.OpticalDisc[0].Checksums;
|
||||
}
|
||||
filterId == new System.Guid("1b2165ee-c9df-4b21-bbbb-9e5892b2df4d"))) xmlTrk.Checksums = sidecar.OpticalDisc[0].Checksums;
|
||||
else
|
||||
{
|
||||
UpdateProgress("Track {0} of {1}", trk.TrackSequence, tracks.Count);
|
||||
@@ -474,7 +460,6 @@ namespace DiscImageChef.Core
|
||||
List<FileSystemType> lstFs = new List<FileSystemType>();
|
||||
|
||||
foreach(Filesystem plugin in plugins.PluginsList.Values)
|
||||
{
|
||||
try
|
||||
{
|
||||
if(plugin.Identify(image, partitions[i]))
|
||||
@@ -497,7 +482,6 @@ namespace DiscImageChef.Core
|
||||
{
|
||||
//DicConsole.DebugWriteLine("Create-sidecar command", "Plugin {0} crashed", _plugin.Name);
|
||||
}
|
||||
}
|
||||
|
||||
if(lstFs.Count > 0) xmlTrk.FileSystemInformation[i].FileSystems = lstFs.ToArray();
|
||||
}
|
||||
@@ -520,7 +504,6 @@ namespace DiscImageChef.Core
|
||||
Sequence = (ulong)xmlTrk.Sequence.TrackNumber
|
||||
};
|
||||
foreach(Filesystem plugin in plugins.PluginsList.Values)
|
||||
{
|
||||
try
|
||||
{
|
||||
if(plugin.Identify(image, xmlPart))
|
||||
@@ -541,7 +524,6 @@ namespace DiscImageChef.Core
|
||||
{
|
||||
//DicConsole.DebugWriteLine("Create-sidecar command", "Plugin {0} crashed", _plugin.Name);
|
||||
}
|
||||
}
|
||||
|
||||
if(lstFs.Count > 0) xmlTrk.FileSystemInformation[0].FileSystems = lstFs.ToArray();
|
||||
}
|
||||
@@ -573,7 +555,6 @@ namespace DiscImageChef.Core
|
||||
!string.IsNullOrEmpty(image.ImageInfo.DriveModel) ||
|
||||
!string.IsNullOrEmpty(image.ImageInfo.DriveFirmwareRevision) ||
|
||||
!string.IsNullOrEmpty(image.ImageInfo.DriveSerialNumber))
|
||||
{
|
||||
sidecar.OpticalDisc[0].DumpHardwareArray = new[]
|
||||
{
|
||||
new DumpHardwareType
|
||||
@@ -590,7 +571,6 @@ namespace DiscImageChef.Core
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user