Files
BinaryObjectScanner/BurnOutSharp/ProtectionType/ProtectDVDVideo.cs

41 lines
1.2 KiB
C#
Raw Normal View History

using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using System.Linq;
2022-05-01 17:41:50 -07:00
using BurnOutSharp.Interfaces;
namespace BurnOutSharp.ProtectionType
{
// TODO: Figure out how to use path check framework here
2021-02-26 00:32:09 -08:00
public class ProtectDVDVideo : IPathCheck
{
2021-02-26 00:32:09 -08:00
/// <inheritdoc/>
public ConcurrentQueue<string> CheckDirectoryPath(string path, IEnumerable<string> files)
{
var protections = new ConcurrentQueue<string>();
if (Directory.Exists(Path.Combine(path, "VIDEO_TS")))
{
string[] ifofiles = files.Where(s => s.EndsWith(".ifo")).ToArray();
for (int i = 0; i < ifofiles.Length; i++)
{
FileInfo ifofile = new FileInfo(ifofiles[i]);
if (ifofile.Length == 0)
{
protections.Enqueue("Protect DVD-Video (Unconfirmed - Please report to us on Github)");
break;
}
}
}
2021-03-19 15:41:49 -07:00
return protections;
2021-03-19 15:41:49 -07:00
}
2021-03-19 15:41:49 -07:00
/// <inheritdoc/>
public string CheckFilePath(string path)
{
return null;
}
}
}