aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Library/ILibraryManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/Library/ILibraryManager.cs')
-rw-r--r--MediaBrowser.Controller/Library/ILibraryManager.cs168
1 files changed, 101 insertions, 67 deletions
diff --git a/MediaBrowser.Controller/Library/ILibraryManager.cs b/MediaBrowser.Controller/Library/ILibraryManager.cs
index 8aaa08fdd..8573f32e0 100644
--- a/MediaBrowser.Controller/Library/ILibraryManager.cs
+++ b/MediaBrowser.Controller/Library/ILibraryManager.cs
@@ -1,5 +1,6 @@
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities.Audio;
+using MediaBrowser.Controller.Entities.TV;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Controller.Resolvers;
using MediaBrowser.Controller.Sorting;
@@ -18,29 +19,13 @@ namespace MediaBrowser.Controller.Library
public interface ILibraryManager
{
/// <summary>
- /// Resolves the item.
- /// </summary>
- /// <param name="args">The args.</param>
- /// <returns>BaseItem.</returns>
- BaseItem ResolveItem(ItemResolveArgs args);
-
- /// <summary>
- /// Resolves a path into a BaseItem
- /// </summary>
- /// <param name="fileInfo">The file info.</param>
- /// <param name="directoryService">The directory service.</param>
- /// <param name="parent">The parent.</param>
- /// <returns>BaseItem.</returns>
- /// <exception cref="System.ArgumentNullException"></exception>
- BaseItem ResolvePath(FileSystemInfo fileInfo, IDirectoryService directoryService, Folder parent = null);
-
- /// <summary>
/// Resolves the path.
/// </summary>
/// <param name="fileInfo">The file information.</param>
/// <param name="parent">The parent.</param>
/// <returns>BaseItem.</returns>
- BaseItem ResolvePath(FileSystemInfo fileInfo, Folder parent = null);
+ BaseItem ResolvePath(FileSystemInfo fileInfo,
+ Folder parent = null);
/// <summary>
/// Resolves a set of files into a list of BaseItem
@@ -49,9 +34,12 @@ namespace MediaBrowser.Controller.Library
/// <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>
- List<T> ResolvePaths<T>(IEnumerable<FileSystemInfo> files, IDirectoryService directoryService, Folder parent)
- where T : BaseItem;
+ IEnumerable<BaseItem> ResolvePaths(IEnumerable<FileSystemInfo> files,
+ IDirectoryService directoryService,
+ Folder parent, string
+ collectionType = null);
/// <summary>
/// Gets the root folder.
@@ -152,12 +140,19 @@ namespace MediaBrowser.Controller.Library
BaseItem GetItemById(Guid id);
/// <summary>
+ /// Gets the memory item by identifier.
+ /// </summary>
+ /// <param name="id">The identifier.</param>
+ /// <returns>BaseItem.</returns>
+ BaseItem GetMemoryItemById(Guid id);
+
+ /// <summary>
/// Gets the intros.
/// </summary>
/// <param name="item">The item.</param>
/// <param name="user">The user.</param>
/// <returns>IEnumerable{System.String}.</returns>
- IEnumerable<Video> GetIntros(BaseItem item, User user);
+ Task<IEnumerable<Video>> GetIntros(BaseItem item, User user);
/// <summary>
/// Gets all intro files.
@@ -238,46 +233,6 @@ namespace MediaBrowser.Controller.Library
BaseItem RetrieveItem(Guid id);
/// <summary>
- /// Validates the artists.
- /// </summary>
- /// <param name="cancellationToken">The cancellation token.</param>
- /// <param name="progress">The progress.</param>
- /// <returns>Task.</returns>
- Task ValidateArtists(CancellationToken cancellationToken, IProgress<double> progress);
-
- /// <summary>
- /// Validates the music genres.
- /// </summary>
- /// <param name="cancellationToken">The cancellation token.</param>
- /// <param name="progress">The progress.</param>
- /// <returns>Task.</returns>
- Task ValidateMusicGenres(CancellationToken cancellationToken, IProgress<double> progress);
-
- /// <summary>
- /// Validates the game genres.
- /// </summary>
- /// <param name="cancellationToken">The cancellation token.</param>
- /// <param name="progress">The progress.</param>
- /// <returns>Task.</returns>
- Task ValidateGameGenres(CancellationToken cancellationToken, IProgress<double> progress);
-
- /// <summary>
- /// Validates the genres.
- /// </summary>
- /// <param name="cancellationToken">The cancellation token.</param>
- /// <param name="progress">The progress.</param>
- /// <returns>Task.</returns>
- Task ValidateGenres(CancellationToken cancellationToken, IProgress<double> progress);
-
- /// <summary>
- /// Validates the studios.
- /// </summary>
- /// <param name="cancellationToken">The cancellation token.</param>
- /// <param name="progress">The progress.</param>
- /// <returns>Task.</returns>
- Task ValidateStudios(CancellationToken cancellationToken, IProgress<double> progress);
-
- /// <summary>
/// Occurs when [item added].
/// </summary>
event EventHandler<ItemChangeEventArgs> ItemAdded;
@@ -302,9 +257,16 @@ namespace MediaBrowser.Controller.Library
/// </summary>
/// <param name="item">The item.</param>
/// <returns>System.String.</returns>
- string FindCollectionType(BaseItem item);
+ string GetContentType(BaseItem item);
/// <summary>
+ /// Gets the type of the inherited content.
+ /// </summary>
+ /// <param name="item">The item.</param>
+ /// <returns>System.String.</returns>
+ string GetInheritedContentType(BaseItem item);
+
+ /// <summary>
/// Normalizes the root path list.
/// </summary>
/// <param name="paths">The paths.</param>
@@ -333,15 +295,21 @@ namespace MediaBrowser.Controller.Library
IEnumerable<BaseItem> ReplaceVideosWithPrimaryVersions(IEnumerable<BaseItem> items);
/// <summary>
- /// Gets the named folder.
+ /// Gets the special folder.
/// </summary>
+ /// <param name="user">The user.</param>
/// <param name="name">The name.</param>
- /// <param name="category">The category.</param>
+ /// <param name="parentId">The parent identifier.</param>
/// <param name="viewType">Type of the view.</param>
/// <param name="sortName">Name of the sort.</param>
/// <param name="cancellationToken">The cancellation token.</param>
- /// <returns>Task{Folder}.</returns>
- Task<UserView> GetNamedView(string name, string category, string viewType, string sortName, CancellationToken cancellationToken);
+ /// <returns>Task&lt;UserView&gt;.</returns>
+ Task<UserView> GetSpecialFolder(User user,
+ string name,
+ string parentId,
+ string viewType,
+ string sortName,
+ CancellationToken cancellationToken);
/// <summary>
/// Gets the named view.
@@ -351,6 +319,72 @@ namespace MediaBrowser.Controller.Library
/// <param name="sortName">Name of the sort.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task&lt;UserView&gt;.</returns>
- Task<UserView> GetNamedView(string name, string viewType, string sortName, CancellationToken cancellationToken);
+ Task<UserView> GetNamedView(string name,
+ string viewType,
+ string sortName,
+ CancellationToken cancellationToken);
+
+ /// <summary>
+ /// Determines whether [is video file] [the specified path].
+ /// </summary>
+ /// <param name="path">The path.</param>
+ /// <returns><c>true</c> if [is video file] [the specified path]; otherwise, <c>false</c>.</returns>
+ bool IsVideoFile(string path);
+
+ /// <summary>
+ /// Determines whether [is audio file] [the specified path].
+ /// </summary>
+ /// <param name="path">The path.</param>
+ /// <returns><c>true</c> if [is audio file] [the specified path]; otherwise, <c>false</c>.</returns>
+ bool IsAudioFile(string path);
+
+ /// <summary>
+ /// Gets the season number from path.
+ /// </summary>
+ /// <param name="path">The path.</param>
+ /// <returns>System.Nullable&lt;System.Int32&gt;.</returns>
+ int? GetSeasonNumberFromPath(string path);
+
+ /// <summary>
+ /// Fills the missing episode numbers from path.
+ /// </summary>
+ /// <param name="episode">The episode.</param>
+ /// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
+ bool FillMissingEpisodeNumbersFromPath(Episode episode);
+
+ /// <summary>
+ /// Parses the name.
+ /// </summary>
+ /// <param name="name">The name.</param>
+ /// <returns>ItemInfo.</returns>
+ ItemLookupInfo ParseName(string name);
+
+ /// <summary>
+ /// Gets the new item identifier.
+ /// </summary>
+ /// <param name="key">The key.</param>
+ /// <param name="type">The type.</param>
+ /// <returns>Guid.</returns>
+ Guid GetNewItemId(string key, Type type);
+
+ /// <summary>
+ /// Finds the trailers.
+ /// </summary>
+ /// <param name="owner">The owner.</param>
+ /// <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,
+ IDirectoryService directoryService);
+
+ /// <summary>
+ /// Finds the extras.
+ /// </summary>
+ /// <param name="owner">The owner.</param>
+ /// <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,
+ IDirectoryService directoryService);
}
} \ No newline at end of file