mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Read metadata sidecar for raw sector-by-sector images.
This commit is contained in:
@@ -51,6 +51,7 @@
|
|||||||
<Reference Include="System.ValueTuple">
|
<Reference Include="System.ValueTuple">
|
||||||
<HintPath>..\packages\System.ValueTuple.4.4.0\lib\portable-net40+sl4+win8+wp8\System.ValueTuple.dll</HintPath>
|
<HintPath>..\packages\System.ValueTuple.4.4.0\lib\portable-net40+sl4+win8+wp8\System.ValueTuple.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="DiscFerret.cs" />
|
<Compile Include="DiscFerret.cs" />
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Xml.Serialization;
|
||||||
using DiscImageChef.CommonTypes;
|
using DiscImageChef.CommonTypes;
|
||||||
using DiscImageChef.Console;
|
using DiscImageChef.Console;
|
||||||
using DiscImageChef.Decoders.ATA;
|
using DiscImageChef.Decoders.ATA;
|
||||||
@@ -1041,6 +1042,19 @@ namespace DiscImageChef.DiscImages
|
|||||||
|
|
||||||
DicConsole.VerboseWriteLine("Raw disk image contains a disk of type {0}", imageInfo.MediaType);
|
DicConsole.VerboseWriteLine("Raw disk image contains a disk of type {0}", imageInfo.MediaType);
|
||||||
|
|
||||||
|
XmlSerializer sidecarXs = new XmlSerializer(typeof(CICMMetadataType));
|
||||||
|
if(File.Exists(basename + "cicm.xml"))
|
||||||
|
try
|
||||||
|
{
|
||||||
|
StreamReader sr = new StreamReader(basename + "cicm.xml");
|
||||||
|
CicmMetadata = (CICMMetadataType)sidecarXs.Deserialize(sr);
|
||||||
|
sr.Close();
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
// Do nothing.
|
||||||
|
}
|
||||||
|
|
||||||
imageInfo.ReadableMediaTags = new List<MediaTagType>(mediaTags.Keys);
|
imageInfo.ReadableMediaTags = new List<MediaTagType>(mediaTags.Keys);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user