mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Move optical disc exclusive methods to new interfaces.
This commit is contained in:
@@ -62,9 +62,11 @@ namespace DiscImageChef.Core
|
||||
/// <param name="plugins">Image plugins</param>
|
||||
/// <param name="imgChecksums">List of image checksums</param>
|
||||
/// <param name="sidecar">Metadata sidecar</param>
|
||||
static void OpticalDisc(IMediaImage image, Guid filterId, string imagePath,
|
||||
FileInfo fi, PluginBase plugins,
|
||||
List<ChecksumType> imgChecksums, ref CICMMetadataType sidecar, Encoding encoding)
|
||||
static void OpticalDisc(IOpticalMediaImage image, Guid filterId,
|
||||
string imagePath, FileInfo fi,
|
||||
PluginBase plugins, List<ChecksumType> imgChecksums,
|
||||
ref CICMMetadataType sidecar,
|
||||
Encoding encoding)
|
||||
{
|
||||
sidecar.OpticalDisc = new[]
|
||||
{
|
||||
|
||||
@@ -37,6 +37,7 @@ using System.Text;
|
||||
using DiscImageChef.CommonTypes;
|
||||
using DiscImageChef.CommonTypes.Enums;
|
||||
using DiscImageChef.CommonTypes.Interfaces;
|
||||
using DiscImageChef.Console;
|
||||
using Schemas;
|
||||
|
||||
namespace DiscImageChef.Core
|
||||
@@ -102,7 +103,16 @@ namespace DiscImageChef.Core
|
||||
switch(image.Info.XmlMediaType)
|
||||
{
|
||||
case XmlMediaType.OpticalDisc:
|
||||
OpticalDisc(image, filterId, imagePath, fi, plugins, imgChecksums, ref sidecar, encoding);
|
||||
if(image is IOpticalMediaImage opticalImage)
|
||||
OpticalDisc(opticalImage, filterId, imagePath, fi, plugins, imgChecksums, ref sidecar,
|
||||
encoding);
|
||||
else
|
||||
{
|
||||
DicConsole
|
||||
.ErrorWriteLine("The specified image says it contains an optical media but at the same time says it does not support them.");
|
||||
DicConsole.ErrorWriteLine("Please open an issue at Github.");
|
||||
}
|
||||
|
||||
break;
|
||||
case XmlMediaType.BlockMedia:
|
||||
BlockMedia(image, filterId, imagePath, fi, plugins, imgChecksums, ref sidecar, encoding);
|
||||
|
||||
Reference in New Issue
Block a user