mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-02-03 21:29:23 +00:00
40 lines
1.1 KiB
C#
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;
|
|
}
|
|
}
|
|
}
|