mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-02-11 05:35:15 +00:00
30 lines
982 B
C#
30 lines
982 B
C#
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
|
|
namespace BurnOutSharp.ProtectionType
|
|
{
|
|
public class DVDMoviePROTECT
|
|
{
|
|
public static string CheckPath(string path, IEnumerable<string> files, bool isDirectory)
|
|
{
|
|
if (!isDirectory)
|
|
return null;
|
|
|
|
if (Directory.Exists(Path.Combine(path, "VIDEO_TS")))
|
|
{
|
|
string[] bupfiles = files.Where(s => s.EndsWith(".bup")).ToArray();
|
|
for (int i = 0; i < bupfiles.Length; i++)
|
|
{
|
|
FileInfo bupfile = new FileInfo(bupfiles[i]);
|
|
FileInfo ifofile = new FileInfo(bupfile.DirectoryName + "\\" + bupfile.Name.Substring(0, bupfile.Name.Length - bupfile.Extension.Length) + ".ifo");
|
|
if (bupfile.Length != ifofile.Length)
|
|
return "DVD-Movie-PROTECT"; ;
|
|
}
|
|
}
|
|
|
|
return null;
|
|
}
|
|
}
|
|
}
|