diff --git a/.idea/.idea.DiscImageChef/.idea/contentModel.xml b/.idea/.idea.DiscImageChef/.idea/contentModel.xml
index 596b31d4c..2dafa9b32 100644
--- a/.idea/.idea.DiscImageChef/.idea/contentModel.xml
+++ b/.idea/.idea.DiscImageChef/.idea/contentModel.xml
@@ -324,9 +324,12 @@
+
+
+
@@ -1821,9 +1824,13 @@
+
+
+
+
@@ -1866,7 +1873,6 @@
-
diff --git a/DiscImageChef.CommonTypes/DiscImageChef.CommonTypes.csproj b/DiscImageChef.CommonTypes/DiscImageChef.CommonTypes.csproj
index 42305f78a..26f69da3b 100644
--- a/DiscImageChef.CommonTypes/DiscImageChef.CommonTypes.csproj
+++ b/DiscImageChef.CommonTypes/DiscImageChef.CommonTypes.csproj
@@ -76,6 +76,7 @@
+
diff --git a/DiscImageChef.CommonTypes/Metadata/CdOffset.cs b/DiscImageChef.CommonTypes/Metadata/CdOffset.cs
new file mode 100644
index 000000000..f6f20d41f
--- /dev/null
+++ b/DiscImageChef.CommonTypes/Metadata/CdOffset.cs
@@ -0,0 +1,11 @@
+namespace DiscImageChef.CommonTypes.Metadata
+{
+ public class CdOffset
+ {
+ public string Manufacturer { get; set; }
+ public string Model { get; set; }
+ public short Offset { get; set; }
+ public int Submissions { get; set; }
+ public float Agreement { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/DiscImageChef.Core/DiscImageChef.Core.csproj.DotSettings b/DiscImageChef.Core/DiscImageChef.Core.csproj.DotSettings
new file mode 100644
index 000000000..827beb421
--- /dev/null
+++ b/DiscImageChef.Core/DiscImageChef.Core.csproj.DotSettings
@@ -0,0 +1,2 @@
+
+ Experimental
\ No newline at end of file
diff --git a/DiscImageChef.Database/Context.cs b/DiscImageChef.Database/Context.cs
index 2b5407768..82fff0d77 100644
--- a/DiscImageChef.Database/Context.cs
+++ b/DiscImageChef.Database/Context.cs
@@ -56,6 +56,7 @@ namespace DiscImageChef.Database
public DbSet Versions { get; set; }
public DbSet UsbVendors { get; set; }
public DbSet UsbProducts { get; set; }
+ public DbSet CdOffsets { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
diff --git a/DiscImageChef.Database/DiscImageChef.Database.csproj b/DiscImageChef.Database/DiscImageChef.Database.csproj
index 885cd04f1..9e8ca2896 100644
--- a/DiscImageChef.Database/DiscImageChef.Database.csproj
+++ b/DiscImageChef.Database/DiscImageChef.Database.csproj
@@ -84,7 +84,10 @@
+
+
+
diff --git a/DiscImageChef.Database/Migrations/20181225002740_AddCdOffsets.Designer.cs b/DiscImageChef.Database/Migrations/20181225002740_AddCdOffsets.Designer.cs
new file mode 100644
index 000000000..529979024
--- /dev/null
+++ b/DiscImageChef.Database/Migrations/20181225002740_AddCdOffsets.Designer.cs
@@ -0,0 +1,1425 @@
+//
+using System;
+using DiscImageChef.Database;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+namespace DiscImageChef.Database.Migrations
+{
+ [DbContext(typeof(DicContext))]
+ [Migration("20181225002740_AddCdOffsets")]
+ partial class AddCdOffsets
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "2.1.4-rtm-31024");
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Ata", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Identify");
+
+ b.Property("ReadCapabilitiesId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ReadCapabilitiesId");
+
+ b.ToTable("Ata");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.BlockDescriptor", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("BlockLength");
+
+ b.Property("BlockLengthSql");
+
+ b.Property("Blocks");
+
+ b.Property("BlocksSql");
+
+ b.Property("Density");
+
+ b.Property("ScsiModeId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ScsiModeId");
+
+ b.ToTable("BlockDescriptor");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Chs", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Cylinders");
+
+ b.Property("CylindersSql");
+
+ b.Property("Heads");
+
+ b.Property("HeadsSql");
+
+ b.Property("Sectors");
+
+ b.Property("SectorsSql");
+
+ b.HasKey("Id");
+
+ b.ToTable("Chs");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.DensityCode", b =>
+ {
+ b.Property("Code")
+ .ValueGeneratedOnAdd();
+
+ b.Property("SscSupportedMediaId");
+
+ b.HasKey("Code");
+
+ b.HasIndex("SscSupportedMediaId");
+
+ b.ToTable("DensityCode");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.FireWire", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Manufacturer");
+
+ b.Property("Product");
+
+ b.Property("ProductID");
+
+ b.Property("ProductIDSql");
+
+ b.Property("RemovableMedia");
+
+ b.Property("VendorID");
+
+ b.Property("VendorIDSql");
+
+ b.HasKey("Id");
+
+ b.ToTable("FireWire");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Mmc", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("FeaturesId");
+
+ b.Property("ModeSense2AData");
+
+ b.HasKey("Id");
+
+ b.HasIndex("FeaturesId");
+
+ b.ToTable("Mmc");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.MmcFeatures", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("AACSVersion");
+
+ b.Property("AGIDs");
+
+ b.Property("BindingNonceBlocks");
+
+ b.Property("BlocksPerReadableUnit");
+
+ b.Property("BlocksPerReadableUnitSql");
+
+ b.Property("BufferUnderrunFreeInDVD");
+
+ b.Property("BufferUnderrunFreeInSAO");
+
+ b.Property("BufferUnderrunFreeInTAO");
+
+ b.Property("CPRMVersion");
+
+ b.Property("CSSVersion");
+
+ b.Property("CanAudioScan");
+
+ b.Property("CanEject");
+
+ b.Property("CanEraseSector");
+
+ b.Property("CanExpandBDRESpareArea");
+
+ b.Property("CanFormat");
+
+ b.Property("CanFormatBDREWithoutSpare");
+
+ b.Property("CanFormatCert");
+
+ b.Property("CanFormatFRF");
+
+ b.Property("CanFormatQCert");
+
+ b.Property("CanFormatRRM");
+
+ b.Property("CanGenerateBindingNonce");
+
+ b.Property("CanLoad");
+
+ b.Property("CanMuteSeparateChannels");
+
+ b.Property("CanOverwriteSAOTrack");
+
+ b.Property("CanOverwriteTAOTrack");
+
+ b.Property("CanPlayCDAudio");
+
+ b.Property("CanPseudoOverwriteBDR");
+
+ b.Property("CanReadAllDualR");
+
+ b.Property("CanReadAllDualRW");
+
+ b.Property("CanReadBD");
+
+ b.Property("CanReadBDR");
+
+ b.Property("CanReadBDRE1");
+
+ b.Property("CanReadBDRE2");
+
+ b.Property("CanReadBDROM");
+
+ b.Property("CanReadBluBCA");
+
+ b.Property("CanReadCD");
+
+ b.Property("CanReadCDMRW");
+
+ b.Property("CanReadCPRM_MKB");
+
+ b.Property("CanReadDDCD");
+
+ b.Property("CanReadDVD");
+
+ b.Property("CanReadDVDPlusMRW");
+
+ b.Property("CanReadDVDPlusR");
+
+ b.Property("CanReadDVDPlusRDL");
+
+ b.Property("CanReadDVDPlusRW");
+
+ b.Property("CanReadDVDPlusRWDL");
+
+ b.Property("CanReadDriveAACSCertificate");
+
+ b.Property("CanReadHDDVD");
+
+ b.Property("CanReadHDDVDR");
+
+ b.Property("CanReadHDDVDRAM");
+
+ b.Property("CanReadLeadInCDText");
+
+ b.Property("CanReadOldBDR");
+
+ b.Property("CanReadOldBDRE");
+
+ b.Property("CanReadOldBDROM");
+
+ b.Property("CanReadSpareAreaInformation");
+
+ b.Property("CanReportDriveSerial");
+
+ b.Property("CanReportMediaSerial");
+
+ b.Property("CanTestWriteDDCDR");
+
+ b.Property("CanTestWriteDVD");
+
+ b.Property("CanTestWriteInSAO");
+
+ b.Property("CanTestWriteInTAO");
+
+ b.Property("CanUpgradeFirmware");
+
+ b.Property("CanWriteBD");
+
+ b.Property("CanWriteBDR");
+
+ b.Property("CanWriteBDRE1");
+
+ b.Property("CanWriteBDRE2");
+
+ b.Property("CanWriteBusEncryptedBlocks");
+
+ b.Property("CanWriteCDMRW");
+
+ b.Property("CanWriteCDRW");
+
+ b.Property("CanWriteCDRWCAV");
+
+ b.Property("CanWriteCDSAO");
+
+ b.Property("CanWriteCDTAO");
+
+ b.Property("CanWriteCSSManagedDVD");
+
+ b.Property("CanWriteDDCDR");
+
+ b.Property("CanWriteDDCDRW");
+
+ b.Property("CanWriteDVDPlusMRW");
+
+ b.Property("CanWriteDVDPlusR");
+
+ b.Property("CanWriteDVDPlusRDL");
+
+ b.Property("CanWriteDVDPlusRW");
+
+ b.Property("CanWriteDVDPlusRWDL");
+
+ b.Property("CanWriteDVDR");
+
+ b.Property("CanWriteDVDRDL");
+
+ b.Property("CanWriteDVDRW");
+
+ b.Property("CanWriteHDDVDR");
+
+ b.Property("CanWriteHDDVDRAM");
+
+ b.Property("CanWriteOldBDR");
+
+ b.Property("CanWriteOldBDRE");
+
+ b.Property("CanWritePackedSubchannelInTAO");
+
+ b.Property("CanWriteRWSubchannelInSAO");
+
+ b.Property("CanWriteRWSubchannelInTAO");
+
+ b.Property("CanWriteRaw");
+
+ b.Property("CanWriteRawMultiSession");
+
+ b.Property("CanWriteRawSubchannelInTAO");
+
+ b.Property("ChangerIsSideChangeCapable");
+
+ b.Property("ChangerSlots");
+
+ b.Property("ChangerSupportsDiscPresent");
+
+ b.Property("DBML");
+
+ b.Property("DVDMultiRead");
+
+ b.Property("EmbeddedChanger");
+
+ b.Property("ErrorRecoveryPage");
+
+ b.Property("FirmwareDate");
+
+ b.Property("LoadingMechanismType");
+
+ b.Property("Locked");
+
+ b.Property("LogicalBlockSize");
+
+ b.Property("LogicalBlockSizeSql");
+
+ b.Property("MultiRead");
+
+ b.Property("PhysicalInterfaceStandardNumber");
+
+ b.Property("PhysicalInterfaceStandardNumberSql");
+
+ b.Property("PreventJumper");
+
+ b.Property("SupportsAACS");
+
+ b.Property("SupportsBusEncryption");
+
+ b.Property("SupportsC2");
+
+ b.Property("SupportsCPRM");
+
+ b.Property("SupportsCSS");
+
+ b.Property("SupportsDAP");
+
+ b.Property("SupportsDeviceBusyEvent");
+
+ b.Property("SupportsHybridDiscs");
+
+ b.Property("SupportsModePage1Ch");
+
+ b.Property("SupportsOSSC");
+
+ b.Property("SupportsPWP");
+
+ b.Property("SupportsSWPP");
+
+ b.Property("SupportsSecurDisc");
+
+ b.Property("SupportsSeparateVolume");
+
+ b.Property("SupportsVCPS");
+
+ b.Property("SupportsWriteInhibitDCB");
+
+ b.Property("SupportsWriteProtectPAC");
+
+ b.Property("VolumeLevels");
+
+ b.Property("VolumeLevelsSql");
+
+ b.HasKey("Id");
+
+ b.ToTable("MmcFeatures");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.MmcSd", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("CID");
+
+ b.Property("CSD");
+
+ b.Property("ExtendedCSD");
+
+ b.Property("OCR");
+
+ b.Property("SCR");
+
+ b.HasKey("Id");
+
+ b.ToTable("MmcSd");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Pcmcia", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("CIS");
+
+ b.Property("CardCode");
+
+ b.Property("CardCodeSql");
+
+ b.Property("Compliance");
+
+ b.Property("Manufacturer");
+
+ b.Property("ManufacturerCode");
+
+ b.Property("ManufacturerCodeSql");
+
+ b.Property("ProductName");
+
+ b.HasKey("Id");
+
+ b.ToTable("Pcmcia");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Scsi", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("InquiryData");
+
+ b.Property("ModeSense10Data");
+
+ b.Property("ModeSense6Data");
+
+ b.Property("ModeSenseId");
+
+ b.Property("MultiMediaDeviceId");
+
+ b.Property("ReadCapabilitiesId");
+
+ b.Property("SequentialDeviceId");
+
+ b.Property("SupportsModeSense10");
+
+ b.Property("SupportsModeSense6");
+
+ b.Property("SupportsModeSubpages");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ModeSenseId");
+
+ b.HasIndex("MultiMediaDeviceId");
+
+ b.HasIndex("ReadCapabilitiesId");
+
+ b.HasIndex("SequentialDeviceId");
+
+ b.ToTable("Scsi");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.ScsiMode", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("BlankCheckEnabled");
+
+ b.Property("BufferedMode");
+
+ b.Property("DPOandFUA");
+
+ b.Property("MediumType");
+
+ b.Property("Speed");
+
+ b.Property("WriteProtected");
+
+ b.HasKey("Id");
+
+ b.ToTable("ScsiMode");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.ScsiPage", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ScsiId");
+
+ b.Property("ScsiModeId");
+
+ b.Property("page");
+
+ b.Property("subpage");
+
+ b.Property("value");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ScsiId");
+
+ b.HasIndex("ScsiModeId");
+
+ b.ToTable("ScsiPage");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Ssc", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("BlockSizeGranularity");
+
+ b.Property("MaxBlockLength");
+
+ b.Property("MaxBlockLengthSql");
+
+ b.Property("MinBlockLength");
+
+ b.Property("MinBlockLengthSql");
+
+ b.HasKey("Id");
+
+ b.ToTable("Ssc");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.SscSupportedMedia", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Description");
+
+ b.Property("Length");
+
+ b.Property("LengthSql");
+
+ b.Property("MediumType");
+
+ b.Property("Name");
+
+ b.Property("Organization");
+
+ b.Property("SscId");
+
+ b.Property("TestedSequentialMediaId");
+
+ b.Property("Width");
+
+ b.Property("WidthSql");
+
+ b.HasKey("Id");
+
+ b.HasIndex("SscId");
+
+ b.HasIndex("TestedSequentialMediaId");
+
+ b.ToTable("SscSupportedMedia");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.SupportedDensity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("BitsPerMm");
+
+ b.Property("BitsPerMmSql");
+
+ b.Property("Capacity");
+
+ b.Property("CapacitySql");
+
+ b.Property("DefaultDensity");
+
+ b.Property("Description");
+
+ b.Property("Duplicate");
+
+ b.Property("Name");
+
+ b.Property("Organization");
+
+ b.Property("PrimaryCode");
+
+ b.Property("SecondaryCode");
+
+ b.Property("SscId");
+
+ b.Property("TestedSequentialMediaId");
+
+ b.Property("Tracks");
+
+ b.Property("TracksSql");
+
+ b.Property("Width");
+
+ b.Property("WidthSql");
+
+ b.Property("Writable");
+
+ b.HasKey("Id");
+
+ b.HasIndex("SscId");
+
+ b.HasIndex("TestedSequentialMediaId");
+
+ b.ToTable("SupportedDensity");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.TestedMedia", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("AtaId");
+
+ b.Property("BlockSize");
+
+ b.Property("BlockSizeSql");
+
+ b.Property("Blocks");
+
+ b.Property("BlocksSql");
+
+ b.Property("CHSId");
+
+ b.Property("CanReadAACS");
+
+ b.Property("CanReadADIP");
+
+ b.Property("CanReadATIP");
+
+ b.Property("CanReadBCA");
+
+ b.Property("CanReadC2Pointers");
+
+ b.Property("CanReadCMI");
+
+ b.Property("CanReadCorrectedSubchannel");
+
+ b.Property("CanReadCorrectedSubchannelWithC2");
+
+ b.Property("CanReadDCB");
+
+ b.Property