Add DVD-Audio

This commit is contained in:
Matt Nadareski
2020-08-02 21:41:38 -07:00
parent 34ac5f9ba0
commit ff52767a02
5 changed files with 31 additions and 0 deletions

View File

@@ -218,6 +218,7 @@ namespace DICUI.Data
AudioCD,
BDVideo,
DVDAudio,
DVDVideo,
EnhancedCD,
HDDVDVideo,

View File

@@ -1507,6 +1507,7 @@ namespace DICUI.DiscImageCreator
// Some disc types are audio-only
bool audioOnly = (system == KnownSystem.AtariJaguarCD)
|| (system == KnownSystem.AudioCD)
|| (system == KnownSystem.DVDAudio)
|| (system == KnownSystem.SuperAudioCD);
switch (type)
@@ -1583,6 +1584,7 @@ namespace DICUI.DiscImageCreator
// Some disc types are audio-only
bool audioOnly = (system == KnownSystem.AtariJaguarCD)
|| (system == KnownSystem.AudioCD)
|| (system == KnownSystem.DVDAudio)
|| (system == KnownSystem.SuperAudioCD);
// Fill in the hash data
@@ -1691,6 +1693,7 @@ namespace DICUI.DiscImageCreator
break;
case KnownSystem.DVDAudio:
case KnownSystem.DVDVideo:
info.CopyProtection.Protection = GetDVDProtection(basePath + "_CSSKey.txt", basePath + "_disc.txt") ?? "";
break;

View File

@@ -719,6 +719,8 @@ namespace DICUI.Utilities
return "Audio CD";
case KnownSystem.BDVideo:
return "BD-Video";
case KnownSystem.DVDAudio:
return "DVD-Audio";
case KnownSystem.DVDVideo:
return "DVD-Video";
case KnownSystem.EnhancedCD:
@@ -1125,6 +1127,8 @@ namespace DICUI.Utilities
return "audio";
case KnownSystem.BDVideo:
return "bd-video";
case KnownSystem.DVDAudio:
return "dvd-audio";
case KnownSystem.DVDVideo:
return "dvd-video";
case KnownSystem.EnhancedCD:
@@ -1951,6 +1955,9 @@ namespace DICUI.Utilities
case "blurayvideo":
case "bluray video":
return KnownSystem.BDVideo;
case "dvdaudio":
case "dvd-audio":
return KnownSystem.DVDAudio;
case "dvdvideo":
case "dvd-video":
return KnownSystem.DVDVideo;

View File

@@ -834,6 +834,7 @@ namespace DICUI.Utilities
break;
case KnownSystem.AudioCD:
case KnownSystem.DVDAudio:
case KnownSystem.SuperAudioCD:
info.CommonDiscInfo.Category = info.CommonDiscInfo.Category ?? DiscCategory.Audio;
break;

View File

@@ -618,6 +618,11 @@ namespace DICUI.Utilities
types.Add(MediaType.BluRay);
break;
// https://en.wikipedia.org/wiki/DVD-Audio
case KnownSystem.DVDAudio:
types.Add(MediaType.DVD);
break;
// https://en.wikipedia.org/wiki/DVD-Video
case KnownSystem.DVDVideo:
types.Add(MediaType.DVD);
@@ -909,6 +914,20 @@ namespace DICUI.Utilities
if (drive.InternalDriveType != InternalDriveType.Optical)
return KnownSystem.IBMPCCompatible;
// DVD-Audio
if (Directory.Exists(Path.Combine(drivePath, "AUDIO_TS"))
&& Directory.EnumerateFiles(Path.Combine(drivePath, "AUDIO_TS")).Count() > 0)
{
return KnownSystem.DVDAudio;
}
// DVD-Video
if (Directory.Exists(Path.Combine(drivePath, "VIDEO_TS"))
&& Directory.EnumerateFiles(Path.Combine(drivePath, "VIDEO_TS")).Count() > 0)
{
return KnownSystem.DVDAudio;
}
// Sega Dreamcast
if (File.Exists(Path.Combine(drivePath, "IP.BIN")))
{