mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Read metadata sidecar for raw sector-by-sector images.
This commit is contained in:
@@ -34,6 +34,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Xml.Serialization;
|
||||
using DiscImageChef.CommonTypes;
|
||||
using DiscImageChef.Console;
|
||||
using DiscImageChef.Decoders.ATA;
|
||||
@@ -1041,6 +1042,19 @@ namespace DiscImageChef.DiscImages
|
||||
|
||||
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);
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user