From 4912e3f73b4d40aef4a2fc2e376f4ed72d7758d8 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Mon, 5 Feb 2018 18:23:53 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9BFix=20track=20type=20when=20dumping?= =?UTF-8?q?=20DVD,=20HD=20DVD,=20BD=20or=20XGD.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DiscImageChef.Core/Devices/Dumping/SBC.cs | 4 +++- DiscImageChef.Core/Devices/Dumping/XGD.cs | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/DiscImageChef.Core/Devices/Dumping/SBC.cs b/DiscImageChef.Core/Devices/Dumping/SBC.cs index 70eb218e..6f72f98b 100644 --- a/DiscImageChef.Core/Devices/Dumping/SBC.cs +++ b/DiscImageChef.Core/Devices/Dumping/SBC.cs @@ -47,6 +47,7 @@ using DiscImageChef.Metadata; using Extents; using Schemas; using MediaType = DiscImageChef.CommonTypes.MediaType; +using TrackType = DiscImageChef.DiscImages.TrackType; namespace DiscImageChef.Core.Devices.Dumping { @@ -300,7 +301,8 @@ namespace DiscImageChef.Core.Devices.Dumping TrackSequence = 1, TrackRawBytesPerSector = (int)blockSize, TrackSubchannelType = TrackSubchannelType.None, - TrackSession = 1 + TrackSession = 1, + TrackType = TrackType.Data } }); else if(decMode.HasValue) diff --git a/DiscImageChef.Core/Devices/Dumping/XGD.cs b/DiscImageChef.Core/Devices/Dumping/XGD.cs index b207baba..29a03d48 100644 --- a/DiscImageChef.Core/Devices/Dumping/XGD.cs +++ b/DiscImageChef.Core/Devices/Dumping/XGD.cs @@ -48,6 +48,7 @@ using DiscImageChef.Metadata; using Extents; using Schemas; using MediaType = DiscImageChef.CommonTypes.MediaType; +using TrackType = DiscImageChef.DiscImages.TrackType; namespace DiscImageChef.Core.Devices.Dumping { @@ -359,6 +360,20 @@ namespace DiscImageChef.Core.Devices.Dumping if(currentTry == null || extents == null) throw new NotImplementedException("Could not process resume file, not continuing..."); + outputPlugin.SetTracks(new List + { + new Track + { + TrackBytesPerSector = (int)BLOCK_SIZE, + TrackEndSector = blocks - 1, + TrackSequence = 1, + TrackRawBytesPerSector = (int)BLOCK_SIZE, + TrackSubchannelType = TrackSubchannelType.None, + TrackSession = 1, + TrackType = TrackType.Data + } + }); + ulong currentSector = resume.NextBlock; if(resume.NextBlock > 0) dumpLog.WriteLine("Resuming from block {0}.", resume.NextBlock);