aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Library
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-10-03 23:38:46 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-10-03 23:38:46 -0400
commit8ad702060ea31a3862598056509a2597f6a2b639 (patch)
tree0ff47fe50567456746ebe028599f6dd54b52f6ab /MediaBrowser.Controller/Library
parent64c1628160d31482d6b74fd82a6dfd0c9cf5de96 (diff)
begin file system rework
Diffstat (limited to 'MediaBrowser.Controller/Library')
-rw-r--r--MediaBrowser.Controller/Library/ILibraryManager.cs19
-rw-r--r--MediaBrowser.Controller/Library/ItemResolveArgs.cs15
2 files changed, 22 insertions, 12 deletions
diff --git a/MediaBrowser.Controller/Library/ILibraryManager.cs b/MediaBrowser.Controller/Library/ILibraryManager.cs
index 9331ca7598..93f291aae5 100644
--- a/MediaBrowser.Controller/Library/ILibraryManager.cs
+++ b/MediaBrowser.Controller/Library/ILibraryManager.cs
@@ -11,6 +11,7 @@ using System.Collections.Generic;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
+using MediaBrowser.Common.IO;
namespace MediaBrowser.Controller.Library
{
@@ -25,19 +26,18 @@ namespace MediaBrowser.Controller.Library
/// <param name="fileInfo">The file information.</param>
/// <param name="parent">The parent.</param>
/// <returns>BaseItem.</returns>
- BaseItem ResolvePath(FileSystemInfo fileInfo,
+ BaseItem ResolvePath(FileSystemMetadata fileInfo,
Folder parent = null);
/// <summary>
/// Resolves a set of files into a list of BaseItem
/// </summary>
- /// <typeparam name="T"></typeparam>
/// <param name="files">The files.</param>
/// <param name="directoryService">The directory service.</param>
/// <param name="parent">The parent.</param>
/// <param name="collectionType">Type of the collection.</param>
/// <returns>List{``0}.</returns>
- IEnumerable<BaseItem> ResolvePaths(IEnumerable<FileSystemInfo> files,
+ IEnumerable<BaseItem> ResolvePaths(IEnumerable<FileSystemMetadata> files,
IDirectoryService directoryService,
Folder parent, string
collectionType = null);
@@ -434,7 +434,7 @@ namespace MediaBrowser.Controller.Library
/// <param name="fileSystemChildren">The file system children.</param>
/// <param name="directoryService">The directory service.</param>
/// <returns>IEnumerable&lt;Trailer&gt;.</returns>
- IEnumerable<Video> FindTrailers(BaseItem owner, List<FileSystemInfo> fileSystemChildren,
+ IEnumerable<Video> FindTrailers(BaseItem owner, List<FileSystemMetadata> fileSystemChildren,
IDirectoryService directoryService);
/// <summary>
@@ -444,7 +444,7 @@ namespace MediaBrowser.Controller.Library
/// <param name="fileSystemChildren">The file system children.</param>
/// <param name="directoryService">The directory service.</param>
/// <returns>IEnumerable&lt;Video&gt;.</returns>
- IEnumerable<Video> FindExtras(BaseItem owner, List<FileSystemInfo> fileSystemChildren,
+ IEnumerable<Video> FindExtras(BaseItem owner, List<FileSystemMetadata> fileSystemChildren,
IDirectoryService directoryService);
/// <summary>
@@ -509,5 +509,14 @@ namespace MediaBrowser.Controller.Library
/// <param name="query">The query.</param>
/// <returns>QueryResult&lt;BaseItem&gt;.</returns>
QueryResult<BaseItem> QueryItems(InternalItemsQuery query);
+
+ /// <summary>
+ /// Substitutes the path.
+ /// </summary>
+ /// <param name="path">The path.</param>
+ /// <param name="from">From.</param>
+ /// <param name="to">To.</param>
+ /// <returns>System.String.</returns>
+ string SubstitutePath(string path, string from, string to);
}
} \ No newline at end of file
diff --git a/MediaBrowser.Controller/Library/ItemResolveArgs.cs b/MediaBrowser.Controller/Library/ItemResolveArgs.cs
index db441d285a..6534366911 100644
--- a/MediaBrowser.Controller/Library/ItemResolveArgs.cs
+++ b/MediaBrowser.Controller/Library/ItemResolveArgs.cs
@@ -4,6 +4,7 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
+using MediaBrowser.Common.IO;
namespace MediaBrowser.Controller.Library
{
@@ -35,7 +36,7 @@ namespace MediaBrowser.Controller.Library
/// Gets the file system children.
/// </summary>
/// <value>The file system children.</value>
- public IEnumerable<FileSystemInfo> FileSystemChildren
+ public IEnumerable<FileSystemMetadata> FileSystemChildren
{
get
{
@@ -43,7 +44,7 @@ namespace MediaBrowser.Controller.Library
if (dict == null)
{
- return new List<FileSystemInfo>();
+ return new List<FileSystemMetadata>();
}
return dict.Values;
@@ -54,7 +55,7 @@ namespace MediaBrowser.Controller.Library
/// Gets or sets the file system dictionary.
/// </summary>
/// <value>The file system dictionary.</value>
- public Dictionary<string, FileSystemInfo> FileSystemDictionary { get; set; }
+ public Dictionary<string, FileSystemMetadata> FileSystemDictionary { get; set; }
/// <summary>
/// Gets or sets the parent.
@@ -66,7 +67,7 @@ namespace MediaBrowser.Controller.Library
/// Gets or sets the file info.
/// </summary>
/// <value>The file info.</value>
- public FileSystemInfo FileInfo { get; set; }
+ public FileSystemMetadata FileInfo { get; set; }
/// <summary>
/// Gets or sets the path.
@@ -201,7 +202,7 @@ namespace MediaBrowser.Controller.Library
/// <param name="name">The name.</param>
/// <returns>FileSystemInfo.</returns>
/// <exception cref="System.ArgumentNullException"></exception>
- public FileSystemInfo GetFileSystemEntryByName(string name)
+ public FileSystemMetadata GetFileSystemEntryByName(string name)
{
if (string.IsNullOrEmpty(name))
{
@@ -217,7 +218,7 @@ namespace MediaBrowser.Controller.Library
/// <param name="path">The path.</param>
/// <returns>FileSystemInfo.</returns>
/// <exception cref="System.ArgumentNullException"></exception>
- public FileSystemInfo GetFileSystemEntryByPath(string path)
+ public FileSystemMetadata GetFileSystemEntryByPath(string path)
{
if (string.IsNullOrEmpty(path))
{
@@ -226,7 +227,7 @@ namespace MediaBrowser.Controller.Library
if (FileSystemDictionary != null)
{
- FileSystemInfo entry;
+ FileSystemMetadata entry;
if (FileSystemDictionary.TryGetValue(path, out entry))
{