Files
BinaryObjectScanner/BinaryObjectScanner/Protection/ProtectDVDVideo.cs
2026-01-25 17:27:42 -05:00

40 lines
1.1 KiB
C#

using System.Collections.Generic;
using System.IO;
using BinaryObjectScanner.Interfaces;
namespace BinaryObjectScanner.Protection
{
// TODO: Figure out how to use path check framework here
public class ProtectDVDVideo : IPathCheck
{
/// <inheritdoc/>
public List<string> CheckDirectoryPath(string path, List<string>? files)
{
var protections = new List<string>();
if (files is null)
return protections;
if (Directory.Exists(Path.Combine(path, "VIDEO_TS")))
{
var ifofiles = files.FindAll(s => s.EndsWith(".ifo"));
for (int i = 0; i < ifofiles.Count; i++)
{
if (ifofiles[i].FileSize() == 0)
{
protections.Add("Protect DVD-Video (Unconfirmed - Please report to us on Github)");
break;
}
}
}
return protections;
}
/// <inheritdoc/>
public string? CheckFilePath(string path)
{
return null;
}
}
}