mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Use image capabilities when dumping CDs.
This commit is contained in:
@@ -406,6 +406,36 @@ namespace Aaru.Core.Devices.Dumping
|
|||||||
Invoke("WARNING: The drive has returned incorrect Q positioning when calculating pregaps. A best effort has been tried but they may be incorrect.");
|
Invoke("WARNING: The drive has returned incorrect Q positioning when calculating pregaps. A best effort has been tried but they may be incorrect.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!(_outputPlugin as IWritableOpticalImage).OpticalCapabilities.HasFlag(OpticalImageCapabilities.
|
||||||
|
CanStoreRawData))
|
||||||
|
{
|
||||||
|
if(!_force)
|
||||||
|
{
|
||||||
|
_dumpLog.WriteLine("Output format does not support storing raw data, this may end in a loss of data, not continuing...");
|
||||||
|
|
||||||
|
StoppingErrorMessage?.
|
||||||
|
Invoke("Output format does not support storing raw data, this may end in a loss of data, not continuing...");
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_dumpLog.WriteLine("Output format does not support storing raw data, this may end in a loss of data, continuing...");
|
||||||
|
|
||||||
|
ErrorMessage?.
|
||||||
|
Invoke("Output format does not support storing raw data, this may end in a loss of data, continuing...");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!(_outputPlugin as IWritableOpticalImage).OpticalCapabilities.HasFlag(OpticalImageCapabilities.
|
||||||
|
CanStoreAudioTracks) &&
|
||||||
|
tracks.Any(track => track.TrackType == TrackType.Audio))
|
||||||
|
{
|
||||||
|
_dumpLog.WriteLine("Output format does not support audio tracks, cannot continue...");
|
||||||
|
|
||||||
|
StoppingErrorMessage?.Invoke("Output format does not support audio tracks, cannot continue...");
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(!(_outputPlugin as IWritableOpticalImage).OpticalCapabilities.HasFlag(OpticalImageCapabilities.
|
if(!(_outputPlugin as IWritableOpticalImage).OpticalCapabilities.HasFlag(OpticalImageCapabilities.
|
||||||
CanStorePregaps) &&
|
CanStorePregaps) &&
|
||||||
tracks.Where(track => track.TrackSequence !=
|
tracks.Where(track => track.TrackSequence !=
|
||||||
@@ -455,6 +485,26 @@ namespace Aaru.Core.Devices.Dumping
|
|||||||
// Read media tags
|
// Read media tags
|
||||||
ReadCdTags(ref dskType, mediaTags, out sessions, out firstTrackLastSession);
|
ReadCdTags(ref dskType, mediaTags, out sessions, out firstTrackLastSession);
|
||||||
|
|
||||||
|
if(!(_outputPlugin as IWritableOpticalImage).OpticalCapabilities.HasFlag(OpticalImageCapabilities.
|
||||||
|
CanStoreSessions) &&
|
||||||
|
sessions > 1)
|
||||||
|
{
|
||||||
|
if(!_force)
|
||||||
|
{
|
||||||
|
_dumpLog.WriteLine("Output format does not support sessions, this will end in a loss of data, not continuing...");
|
||||||
|
|
||||||
|
StoppingErrorMessage?.
|
||||||
|
Invoke("Output format does not support sessions, this will end in a loss of data, not continuing...");
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_dumpLog.WriteLine("Output format does not support sessions, this will end in a loss of data, continuing...");
|
||||||
|
|
||||||
|
ErrorMessage?.
|
||||||
|
Invoke("Output format does not support sessions, this will end in a loss of data, continuing...");
|
||||||
|
}
|
||||||
|
|
||||||
// Check if output format supports all disc tags we have retrieved so far
|
// Check if output format supports all disc tags we have retrieved so far
|
||||||
foreach(MediaTagType tag in mediaTags.Keys.Where(tag => !_outputPlugin.SupportedMediaTags.Contains(tag)))
|
foreach(MediaTagType tag in mediaTags.Keys.Where(tag => !_outputPlugin.SupportedMediaTags.Contains(tag)))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user