public static void Transform(BDInfo.BDROM bdrom, Disc disc)
        {
            var fs = new DiscFileSystem
                {
                    Directories = new DiscFileSystem.DiscDirectories
                        {
                            Root = bdrom.DirectoryRoot,
                            BDMV = bdrom.DirectoryBDMV,
                            CLIPINF = bdrom.DirectoryCLIPINF,
                            PLAYLIST = bdrom.DirectoryPLAYLIST,
                            STREAM = bdrom.DirectorySTREAM,
                            SSIF = bdrom.DirectorySSIF,
                            BDMT = GetBDMTDirectory(bdrom.DirectoryBDMV),
                            BDJO = bdrom.DirectoryBDJO,
                            SNP = bdrom.DirectorySNP,
                            ANY = GetDirectory("ANY!", bdrom.DirectoryRoot),
                            MAKEMKV = GetDirectory("MAKEMKV", bdrom.DirectoryRoot),
                            AACS = null /* assigned below */
                        },
                    Files = new DiscFileSystem.DiscFiles
                        {
                            AnyDVDDiscInf = GetFile("disc.inf", bdrom.DirectoryRoot),
                            MCMF = null, /* assigned below */
                            BDMT = null, /* assigned below */
                            Dbox = GetFile("FilmIndex.xml", bdrom.DirectoryRoot)
                        }
                };

            fs.Directories.AACS = GetAACSDirectory(fs);
            fs.Files.MCMF = GetFileOrBackup("mcmf.xml", fs.Directories.AACS);
            fs.Files.BDMT = GetFilesByPattern("bdmt_???.xml", fs.Directories.BDMT);

            disc.FileSystem = fs;
        }
Example #2
0
 private static string GenerateQuickSummary(DiscMetadata metadata, DiscFileSystem fs)
 {
     var volumeLabel = metadata.Derived.VolumeLabel;
     var fullPath = fs.Directories.Root.FullName;
     if (fullPath.EndsWith(volumeLabel))
     {
         return fullPath;
     }
     return string.Format("{0} ({1})", fullPath, volumeLabel);
 }
 private static bool IsPSP(DiscFileSystem fs)
 {
     return fs.Directories.SNP != null &&
           (HasFiles(fs.Directories.SNP, "*.mnv") || HasFiles(fs.Directories.SNP, "*.MNV"));
 }
 private static bool IsDCopy(DiscFileSystem fs)
 {
     return HasFiles(fs.Directories.DCOPY);
 }
 private static bool IsDbox(DiscFileSystem fs)
 {
     return File.Exists(Path.Combine(fs.Directories.Root.FullName, "FilmIndex.xml"));
 }
 private static bool IsBDJava(DiscFileSystem fs)
 {
     return HasFiles(fs.Directories.BDJO);
 }
 private static bool Is3D(DiscFileSystem fs)
 {
     return HasFiles(fs.Directories.SSIF);
 }
 private static bool IsDCopy(DiscFileSystem fs)
 {
     // TODO: Implement
     return false;
 }
 private static DirectoryInfo GetAACSDirectory(DiscFileSystem fs)
 {
     return fs.Directories.ANY ??
            GetDirectory("AACS", fs.Directories.MAKEMKV) ??
            GetDirectory("AACS", fs.Directories.Root);
 }
 private static DirectoryInfo GetDCopyDirectory(DiscFileSystem fs)
 {
     var dir = new DirectoryInfo(Path.Combine(fs.Directories.Root.FullName, "DCOPY"));
     return dir.Exists ? dir : null;
 }