Add Audio CD detection

On Windows 10, at least, when a purely Audio CD is put in, it gets the volume label of "Audio CD", conveniently. We can use this to at least attempt to match, even if this could be a false positive for some CD-i or things like Jag CD
This commit is contained in:
Matt Nadareski
2021-04-07 10:04:59 -07:00
parent 5126a66eb9
commit f7f924593f

View File

@@ -871,6 +871,12 @@ namespace MPF.Utilities
if (drive.InternalDriveType != InternalDriveType.Optical)
return KnownSystem.IBMPCCompatible;
// Audio CD
if (drive.VolumeLabel.Equals("Audio CD", StringComparison.OrdinalIgnoreCase))
{
return KnownSystem.AudioCD;
}
// DVD-Audio
if (Directory.Exists(Path.Combine(drivePath, "AUDIO_TS"))
&& Directory.EnumerateFiles(Path.Combine(drivePath, "AUDIO_TS")).Count() > 0)