diff options
| author | ConfusedPolarBear <33811686+ConfusedPolarBear@users.noreply.github.com> | 2020-05-29 17:42:42 -0500 |
|---|---|---|
| committer | ConfusedPolarBear <33811686+ConfusedPolarBear@users.noreply.github.com> | 2020-05-29 17:42:42 -0500 |
| commit | 5d281adedd0d36f34dd3cb8344af3e6a44b5a29f (patch) | |
| tree | 15bafdf4e3338872fb7e33e341282f4c50de0438 /DvdLib/Ifo/Dvd.cs | |
| parent | 70e50dfa90575cc5e906be1509d3ed363eb1ada4 (diff) | |
| parent | 02624c9df8492b019539f235307108d49774434c (diff) | |
Merge remote-tracking branch 'upstream/master' into quickconnect
Diffstat (limited to 'DvdLib/Ifo/Dvd.cs')
| -rw-r--r-- | DvdLib/Ifo/Dvd.cs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/DvdLib/Ifo/Dvd.cs b/DvdLib/Ifo/Dvd.cs index c0f9cf410..ca20baa73 100644 --- a/DvdLib/Ifo/Dvd.cs +++ b/DvdLib/Ifo/Dvd.cs @@ -1,8 +1,9 @@ +#pragma warning disable CS1591 + using System; using System.Collections.Generic; using System.IO; using System.Linq; -using MediaBrowser.Model.IO; namespace DvdLib.Ifo { @@ -13,13 +14,10 @@ namespace DvdLib.Ifo private ushort _titleCount; public readonly Dictionary<ushort, string> VTSPaths = new Dictionary<ushort, string>(); - private readonly IFileSystem _fileSystem; - - public Dvd(string path, IFileSystem fileSystem) + public Dvd(string path) { - _fileSystem = fileSystem; Titles = new List<Title>(); - var allFiles = _fileSystem.GetFiles(path, true).ToList(); + var allFiles = new DirectoryInfo(path).GetFiles(path, SearchOption.AllDirectories); var vmgPath = allFiles.FirstOrDefault(i => string.Equals(i.Name, "VIDEO_TS.IFO", StringComparison.OrdinalIgnoreCase)) ?? allFiles.FirstOrDefault(i => string.Equals(i.Name, "VIDEO_TS.BUP", StringComparison.OrdinalIgnoreCase)); @@ -76,7 +74,7 @@ namespace DvdLib.Ifo } } - private void ReadVTS(ushort vtsNum, IEnumerable<FileSystemMetadata> allFiles) + private void ReadVTS(ushort vtsNum, IReadOnlyList<FileInfo> allFiles) { var filename = string.Format("VTS_{0:00}_0.IFO", vtsNum); |
