0cf8b376ac
This fix is mainly so I can mass-add series _and_ movie entries using a `IMultiItemResolver` without having to resort to complicated logic using _both_ a `IItemResolver` and a `IMultiItemResolver` by splitting up what gets added where. I've also added three new interface methods to the `IDirectoryService`, one of which is used in the modified `ResolverHelper.SetInitialItemValues(…)` to get the file system entry info for the item regardless of which type the file system entry is. In my local testing so far I haven't found any issues introduced by this change.
29 lines
757 B
C#
29 lines
757 B
C#
#pragma warning disable CA1002, CA1819, CS1591
|
|
|
|
using System.Collections.Generic;
|
|
using MediaBrowser.Model.IO;
|
|
|
|
namespace MediaBrowser.Controller.Providers
|
|
{
|
|
public interface IDirectoryService
|
|
{
|
|
FileSystemMetadata[] GetFileSystemEntries(string path);
|
|
|
|
List<FileSystemMetadata> GetDirectories(string path);
|
|
|
|
List<FileSystemMetadata> GetFiles(string path);
|
|
|
|
FileSystemMetadata? GetFile(string path);
|
|
|
|
FileSystemMetadata? GetDirectory(string path);
|
|
|
|
FileSystemMetadata? GetFileSystemEntry(string path);
|
|
|
|
IReadOnlyList<string> GetFilePaths(string path);
|
|
|
|
IReadOnlyList<string> GetFilePaths(string path, bool clearCache, bool sort = false);
|
|
|
|
bool IsAccessible(string path);
|
|
}
|
|
}
|