diff options
| author | Luke <luke.pulverenti@gmail.com> | 2015-10-26 18:50:19 -0400 |
|---|---|---|
| committer | Luke <luke.pulverenti@gmail.com> | 2015-10-26 18:50:19 -0400 |
| commit | 35778ebc02e5931142a1fe31a256b7488a07c5c2 (patch) | |
| tree | ced0290be8820f5e507b51ca4c5165212b1879d1 /MediaBrowser.Controller/Library | |
| parent | c0dc8d055bfd4d2f58591083beb9e9128357aad6 (diff) | |
| parent | 8d77308593c3b16b733b0109323770d9dfe7e166 (diff) | |
Merge pull request #1222 from MediaBrowser/dev
3.0.5768.7
Diffstat (limited to 'MediaBrowser.Controller/Library')
| -rw-r--r-- | MediaBrowser.Controller/Library/ILibraryManager.cs | 44 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Library/ItemResolveArgs.cs | 16 |
2 files changed, 48 insertions, 12 deletions
diff --git a/MediaBrowser.Controller/Library/ILibraryManager.cs b/MediaBrowser.Controller/Library/ILibraryManager.cs index 9331ca759..c7ab88524 100644 --- a/MediaBrowser.Controller/Library/ILibraryManager.cs +++ b/MediaBrowser.Controller/Library/ILibraryManager.cs @@ -11,6 +11,8 @@ using System.Collections.Generic; using System.IO; using System.Threading; using System.Threading.Tasks; +using CommonIO; +using MediaBrowser.Common.IO; namespace MediaBrowser.Controller.Library { @@ -25,19 +27,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); @@ -385,6 +386,21 @@ namespace MediaBrowser.Controller.Library CancellationToken cancellationToken); /// <summary> + /// Gets the shadow view. + /// </summary> + /// <param name="parent">The parent.</param> + /// <param name="viewType">Type of the view.</param> + /// <param name="sortName">Name of the sort.</param> + /// <param name="uniqueId">The unique identifier.</param> + /// <param name="cancellationToken">The cancellation token.</param> + /// <returns>Task<UserView>.</returns> + Task<UserView> GetShadowView(BaseItem parent, + string viewType, + string sortName, + string uniqueId, + CancellationToken cancellationToken); + + /// <summary> /// Determines whether [is video file] [the specified path]. /// </summary> /// <param name="path">The path.</param> @@ -434,7 +450,7 @@ namespace MediaBrowser.Controller.Library /// <param name="fileSystemChildren">The file system children.</param> /// <param name="directoryService">The directory service.</param> /// <returns>IEnumerable<Trailer>.</returns> - IEnumerable<Video> FindTrailers(BaseItem owner, List<FileSystemInfo> fileSystemChildren, + IEnumerable<Video> FindTrailers(BaseItem owner, List<FileSystemMetadata> fileSystemChildren, IDirectoryService directoryService); /// <summary> @@ -444,7 +460,7 @@ namespace MediaBrowser.Controller.Library /// <param name="fileSystemChildren">The file system children.</param> /// <param name="directoryService">The directory service.</param> /// <returns>IEnumerable<Video>.</returns> - IEnumerable<Video> FindExtras(BaseItem owner, List<FileSystemInfo> fileSystemChildren, + IEnumerable<Video> FindExtras(BaseItem owner, List<FileSystemMetadata> fileSystemChildren, IDirectoryService directoryService); /// <summary> @@ -509,5 +525,23 @@ namespace MediaBrowser.Controller.Library /// <param name="query">The query.</param> /// <returns>QueryResult<BaseItem>.</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); + + /// <summary> + /// Converts the image to local. + /// </summary> + /// <param name="item">The item.</param> + /// <param name="image">The image.</param> + /// <param name="imageIndex">Index of the image.</param> + /// <returns>Task.</returns> + Task<ItemImageInfo> ConvertImageToLocal(IHasImages item, ItemImageInfo image, int imageIndex); } }
\ No newline at end of file diff --git a/MediaBrowser.Controller/Library/ItemResolveArgs.cs b/MediaBrowser.Controller/Library/ItemResolveArgs.cs index db441d285..90158942f 100644 --- a/MediaBrowser.Controller/Library/ItemResolveArgs.cs +++ b/MediaBrowser.Controller/Library/ItemResolveArgs.cs @@ -4,6 +4,8 @@ using System; using System.Collections.Generic; using System.IO; using System.Linq; +using CommonIO; +using MediaBrowser.Common.IO; namespace MediaBrowser.Controller.Library { @@ -35,7 +37,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 +45,7 @@ namespace MediaBrowser.Controller.Library if (dict == null) { - return new List<FileSystemInfo>(); + return new List<FileSystemMetadata>(); } return dict.Values; @@ -54,7 +56,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 +68,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 +203,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 +219,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 +228,7 @@ namespace MediaBrowser.Controller.Library if (FileSystemDictionary != null) { - FileSystemInfo entry; + FileSystemMetadata entry; if (FileSystemDictionary.TryGetValue(path, out entry)) { |
