diff --git a/DiscImageChef.Core/Sidecar.cs b/DiscImageChef.Core/Sidecar.cs index e1b1de55..5a04eccb 100644 --- a/DiscImageChef.Core/Sidecar.cs +++ b/DiscImageChef.Core/Sidecar.cs @@ -99,7 +99,7 @@ namespace DiscImageChef.Core UpdateStatusEvent(string.Format(text, args)); } - public static CICMMetadataType Create(ImagePlugin image, string imagePath) + public static CICMMetadataType Create(ImagePlugin image, string imagePath, System.Guid filterId) { CICMMetadataType sidecar = new CICMMetadataType(); PluginBase plugins = new PluginBase(); @@ -421,7 +421,8 @@ namespace DiscImageChef.Core ulong doneSectors = 0; // 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")) + if(image.PluginUUID == new System.Guid("12345678-AAAA-BBBB-CCCC-123456789000") && + filterId == new System.Guid("12345678-AAAA-BBBB-CCCC-123456789000")) { xmlTrk.Checksums = sidecar.OpticalDisc[0].Checksums; } @@ -786,7 +787,8 @@ 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")) + 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; } diff --git a/DiscImageChef.DiscImages/SaveDskF.cs b/DiscImageChef.DiscImages/SaveDskF.cs new file mode 100644 index 00000000..cccf38ae --- /dev/null +++ b/DiscImageChef.DiscImages/SaveDskF.cs @@ -0,0 +1,41 @@ +// /*************************************************************************** +// The Disc Image Chef +// ---------------------------------------------------------------------------- +// +// Filename : SaveDskF.cs +// Author(s) : Natalia Portillo +// +// Component : Component +// +// --[ Description ] ---------------------------------------------------------- +// +// Description +// +// --[ License ] -------------------------------------------------------------- +// +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2017 Natalia Portillo +// ****************************************************************************/ +using System; +namespace DiscImageChef.DiscImages +{ + public class SaveDskF + { + public SaveDskF() + { + } + } +} diff --git a/DiscImageChef/ChangeLog b/DiscImageChef/ChangeLog index d31b2857..762e1e5b 100644 --- a/DiscImageChef/ChangeLog +++ b/DiscImageChef/ChangeLog @@ -1,3 +1,7 @@ +* Commands/CreateSidecar.cs: + Pass filter UUID to sidecar creation, use it to detect filters and + calculate checksums of disk image and its contents correctly. + * Options.cs: * Commands/DumpMedia.cs: Implemented resume mapfile support. diff --git a/DiscImageChef/Commands/CreateSidecar.cs b/DiscImageChef/Commands/CreateSidecar.cs index b2ade204..525bfc50 100644 --- a/DiscImageChef/Commands/CreateSidecar.cs +++ b/DiscImageChef/Commands/CreateSidecar.cs @@ -101,7 +101,7 @@ namespace DiscImageChef.Commands Sidecar.EndProgressEvent2 += Progress.EndProgress2; Sidecar.UpdateStatusEvent += Progress.UpdateStatus; - CICMMetadataType sidecar = Sidecar.Create(_imageFormat, options.InputFile); + CICMMetadataType sidecar = Sidecar.Create(_imageFormat, options.InputFile, inputFilter.UUID); DicConsole.WriteLine("Writing metadata sidecar");