General cleanup and refactor.

This commit is contained in:
2022-03-07 07:36:44 +00:00
parent bc6e432565
commit 762e3eb6d2
1321 changed files with 44657 additions and 45479 deletions

View File

@@ -25,6 +25,14 @@
// Copyright © 2020-2022 Rebecca Wallander
// ****************************************************************************/
using DVDDecryption = Aaru.Decryption.DVD.Dump;
// ReSharper disable JoinDeclarationAndInitializer
// ReSharper disable InlineOutVariableDeclaration
// ReSharper disable TooWideLocalVariableScope
namespace Aaru.Core.Devices.Dumping;
using System;
using System.Linq;
using Aaru.CommonTypes.Enums;
@@ -34,14 +42,8 @@ using Aaru.Core.Logging;
using Aaru.Decoders.DVD;
using Aaru.Decryption;
using Aaru.Decryption.DVD;
using Aaru.Settings;
using Schemas;
using DVDDecryption = Aaru.Decryption.DVD.Dump;
// ReSharper disable JoinDeclarationAndInitializer
// ReSharper disable InlineOutVariableDeclaration
// ReSharper disable TooWideLocalVariableScope
namespace Aaru.Core.Devices.Dumping;
partial class Dump
{
@@ -107,8 +109,8 @@ partial class Dump
if(!sense &&
!_dev.Error)
{
if(Settings.Settings.Current.EnableDecryption &&
discKey != null &&
if(Settings.Current.EnableDecryption &&
discKey != null &&
_titleKeys)
{
for(ulong j = 0; j < blocksToRead; j++)
@@ -195,8 +197,7 @@ partial class Dump
ErrorMessage?.Invoke($"Error retrieving CMI for sector {i}");
else
{
errno = outputFormat.ReadSectorsTag(i, blocksToRead,
SectorTagType.DvdTitleKeyDecrypted,
errno = outputFormat.ReadSectorsTag(i, blocksToRead, SectorTagType.DvdTitleKeyDecrypted,
out byte[] titleKey);
if(errno != ErrorNumber.NoError)