diff --git a/Aaru.Core/Devices/Dumping/Sbc/Data.cs b/Aaru.Core/Devices/Dumping/Sbc/Data.cs index 7292f1335..425882c47 100644 --- a/Aaru.Core/Devices/Dumping/Sbc/Data.cs +++ b/Aaru.Core/Devices/Dumping/Sbc/Data.cs @@ -177,7 +177,7 @@ namespace Aaru.Core.Devices.Dumping _outputPlugin.WriteSectorTag(titleKey.Value.Key, i + j, SectorTagType.DvdTitleKey); _resume.MissingTitleKeys.Remove(i + j); - CSS.DecryptTitleKey(0, discKey, titleKey.Value.Key, out tmpBuf); + CSS.DecryptTitleKey(0, discKey!, titleKey.Value.Key, out tmpBuf); _outputPlugin.WriteSectorTag(tmpBuf, i + j, SectorTagType.DvdTitleKeyDecrypted); } } diff --git a/Aaru.Core/Devices/Dumping/Sbc/Dump.cs b/Aaru.Core/Devices/Dumping/Sbc/Dump.cs index 48c81eb2e..4f3c8000f 100644 --- a/Aaru.Core/Devices/Dumping/Sbc/Dump.cs +++ b/Aaru.Core/Devices/Dumping/Sbc/Dump.cs @@ -46,6 +46,7 @@ using Aaru.CommonTypes.Structs.Devices.SCSI; using Aaru.Console; using Aaru.Core.Logging; using Aaru.Core.Media.Detection; +using Aaru.Decoders.DVD; using Aaru.Decoders.SCSI; using Aaru.Decoders.SCSI.MMC; using Aaru.Devices; @@ -188,7 +189,7 @@ namespace Aaru.Core.Devices.Dumping _dev.IsUsb, opticalDisc); if(_dev.ScsiType == PeripheralDeviceTypes.MultiMediaDevice) - MMC.DetectDiscType(ref dskType, 1, null, _dev, out _, out _, 0, blocks+1); + MMC.DetectDiscType(ref dskType, 1, null, _dev, out _, out _, 0, blocks + 1); switch(dskType) { @@ -668,9 +669,12 @@ namespace Aaru.Core.Devices.Dumping bool newTrim = false; + mediaTags.TryGetValue(MediaTagType.DVD_CMI, out byte[] cmi); + if(Settings.Settings.Current.EnableDecryption && _titleKeys && - dskType == MediaType.DVDROM) + dskType == MediaType.DVDROM && + (CopyrightType)cmi[0] == CopyrightType.CSS) { UpdateStatus?.Invoke("Title keys dumping is enabled. This will be very slow."); _resume.MissingTitleKeys ??= new List(Enumerable.Range(0, (int)blocks).Select(n => (ulong)n));