2013-05-03 04:10:11 +00:00
|
|
|
|
using MediaBrowser.Controller.Entities;
|
2013-04-21 01:02:16 +00:00
|
|
|
|
using MediaBrowser.Controller.Entities.Audio;
|
2014-12-19 04:20:07 +00:00
|
|
|
|
using MediaBrowser.Controller.Entities.TV;
|
2014-02-13 05:11:54 +00:00
|
|
|
|
using MediaBrowser.Controller.Providers;
|
2013-03-03 16:53:58 +00:00
|
|
|
|
using MediaBrowser.Controller.Resolvers;
|
2013-03-10 04:22:36 +00:00
|
|
|
|
using MediaBrowser.Controller.Sorting;
|
2013-02-28 19:32:41 +00:00
|
|
|
|
using MediaBrowser.Model.Entities;
|
2015-07-28 12:33:30 +00:00
|
|
|
|
using MediaBrowser.Model.Querying;
|
2013-03-02 02:44:46 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
2016-10-25 19:02:04 +00:00
|
|
|
|
using MediaBrowser.Common.IO;
|
2016-08-13 05:49:00 +00:00
|
|
|
|
using MediaBrowser.Controller.Configuration;
|
2016-10-25 19:02:04 +00:00
|
|
|
|
using MediaBrowser.Controller.IO;
|
2016-08-13 20:54:29 +00:00
|
|
|
|
using MediaBrowser.Model.Configuration;
|
2016-06-17 13:06:13 +00:00
|
|
|
|
using MediaBrowser.Model.Dto;
|
2016-10-25 19:02:04 +00:00
|
|
|
|
using MediaBrowser.Model.IO;
|
2013-02-28 19:32:41 +00:00
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Controller.Library
|
|
|
|
|
{
|
2013-05-21 03:16:43 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Interface ILibraryManager
|
|
|
|
|
/// </summary>
|
2013-02-28 19:32:41 +00:00
|
|
|
|
public interface ILibraryManager
|
|
|
|
|
{
|
2014-02-13 05:11:54 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Resolves the path.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="fileInfo">The file information.</param>
|
|
|
|
|
/// <param name="parent">The parent.</param>
|
|
|
|
|
/// <returns>BaseItem.</returns>
|
2016-04-26 03:39:21 +00:00
|
|
|
|
BaseItem ResolvePath(FileSystemMetadata fileInfo,
|
2014-12-22 06:50:29 +00:00
|
|
|
|
Folder parent = null);
|
2014-02-20 04:53:15 +00:00
|
|
|
|
|
2013-02-28 19:32:41 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Resolves a set of files into a list of BaseItem
|
|
|
|
|
/// </summary>
|
2016-04-26 03:39:21 +00:00
|
|
|
|
IEnumerable<BaseItem> ResolvePaths(IEnumerable<FileSystemMetadata> files,
|
2014-12-04 05:24:41 +00:00
|
|
|
|
IDirectoryService directoryService,
|
2016-08-13 05:49:00 +00:00
|
|
|
|
Folder parent,
|
|
|
|
|
LibraryOptions libraryOptions,
|
|
|
|
|
string collectionType = null);
|
2013-02-28 19:32:41 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the root folder.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>The root folder.</value>
|
|
|
|
|
AggregateFolder RootFolder { get; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets a Person
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="name">The name.</param>
|
|
|
|
|
/// <returns>Task{Person}.</returns>
|
2013-09-17 02:08:18 +00:00
|
|
|
|
Person GetPerson(string name);
|
2013-02-28 19:32:41 +00:00
|
|
|
|
|
2016-03-01 19:39:46 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Finds the by path.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="path">The path.</param>
|
|
|
|
|
/// <returns>BaseItem.</returns>
|
2016-04-27 17:53:23 +00:00
|
|
|
|
BaseItem FindByPath(string path, bool? isFolder);
|
2016-04-26 03:39:21 +00:00
|
|
|
|
|
2016-12-13 07:36:30 +00:00
|
|
|
|
Guid? FindIdByPath(string path, bool? isFolder);
|
|
|
|
|
|
2013-04-21 01:02:16 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the artist.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="name">The name.</param>
|
|
|
|
|
/// <returns>Task{Artist}.</returns>
|
2013-11-21 20:48:26 +00:00
|
|
|
|
MusicArtist GetArtist(string name);
|
2015-08-06 01:21:18 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the album artists.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="items">The items.</param>
|
|
|
|
|
/// <returns>IEnumerable<MusicArtist>.</returns>
|
|
|
|
|
IEnumerable<MusicArtist> GetAlbumArtists(IEnumerable<IHasAlbumArtist> items);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the artists.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="items">The items.</param>
|
|
|
|
|
/// <returns>IEnumerable<MusicArtist>.</returns>
|
|
|
|
|
IEnumerable<MusicArtist> GetArtists(IEnumerable<IHasArtist> items);
|
2013-02-28 19:32:41 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets a Studio
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="name">The name.</param>
|
|
|
|
|
/// <returns>Task{Studio}.</returns>
|
2013-09-17 02:08:18 +00:00
|
|
|
|
Studio GetStudio(string name);
|
2013-02-28 19:32:41 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets a Genre
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="name">The name.</param>
|
|
|
|
|
/// <returns>Task{Genre}.</returns>
|
2013-09-17 02:08:18 +00:00
|
|
|
|
Genre GetGenre(string name);
|
2013-02-28 19:32:41 +00:00
|
|
|
|
|
2013-06-11 03:31:00 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the genre.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="name">The name.</param>
|
|
|
|
|
/// <returns>Task{MusicGenre}.</returns>
|
2013-09-17 02:08:18 +00:00
|
|
|
|
MusicGenre GetMusicGenre(string name);
|
2013-07-01 17:17:33 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the game genre.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="name">The name.</param>
|
|
|
|
|
/// <returns>Task{GameGenre}.</returns>
|
2013-09-17 02:08:18 +00:00
|
|
|
|
GameGenre GetGameGenre(string name);
|
|
|
|
|
|
2013-02-28 19:32:41 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets a Year
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="value">The value.</param>
|
|
|
|
|
/// <returns>Task{Year}.</returns>
|
|
|
|
|
/// <exception cref="System.ArgumentOutOfRangeException"></exception>
|
2013-09-17 02:08:18 +00:00
|
|
|
|
Year GetYear(int value);
|
2013-02-28 19:32:41 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Validate and refresh the People sub-set of the IBN.
|
|
|
|
|
/// The items are stored in the db but not loaded into memory until actually requested by an operation.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <param name="progress">The progress.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
|
Task ValidatePeople(CancellationToken cancellationToken, IProgress<double> progress);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Reloads the root media folder
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="progress">The progress.</param>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
|
Task ValidateMediaLibrary(IProgress<double> progress, CancellationToken cancellationToken);
|
|
|
|
|
|
2013-12-15 16:53:32 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Queues the library scan.
|
|
|
|
|
/// </summary>
|
|
|
|
|
void QueueLibraryScan();
|
|
|
|
|
|
2013-02-28 19:32:41 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the default view.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns>IEnumerable{VirtualFolderInfo}.</returns>
|
2015-01-21 03:54:45 +00:00
|
|
|
|
IEnumerable<VirtualFolderInfo> GetVirtualFolders();
|
2013-02-28 19:32:41 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the item by id.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="id">The id.</param>
|
|
|
|
|
/// <returns>BaseItem.</returns>
|
|
|
|
|
BaseItem GetItemById(Guid id);
|
|
|
|
|
|
2013-03-02 02:44:46 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the intros.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="item">The item.</param>
|
|
|
|
|
/// <param name="user">The user.</param>
|
|
|
|
|
/// <returns>IEnumerable{System.String}.</returns>
|
2014-09-22 21:56:54 +00:00
|
|
|
|
Task<IEnumerable<Video>> GetIntros(BaseItem item, User user);
|
2013-10-04 17:04:18 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets all intro files.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns>IEnumerable{System.String}.</returns>
|
|
|
|
|
IEnumerable<string> GetAllIntroFiles();
|
2013-03-02 02:44:46 +00:00
|
|
|
|
|
2013-03-01 21:22:34 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Adds the parts.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="rules">The rules.</param>
|
|
|
|
|
/// <param name="pluginFolders">The plugin folders.</param>
|
|
|
|
|
/// <param name="resolvers">The resolvers.</param>
|
2013-03-02 02:44:46 +00:00
|
|
|
|
/// <param name="introProviders">The intro providers.</param>
|
2013-03-10 04:22:36 +00:00
|
|
|
|
/// <param name="itemComparers">The item comparers.</param>
|
2013-05-27 16:53:10 +00:00
|
|
|
|
/// <param name="postscanTasks">The postscan tasks.</param>
|
2013-09-17 02:08:18 +00:00
|
|
|
|
void AddParts(IEnumerable<IResolverIgnoreRule> rules,
|
|
|
|
|
IEnumerable<IVirtualFolderCreator> pluginFolders,
|
|
|
|
|
IEnumerable<IItemResolver> resolvers,
|
|
|
|
|
IEnumerable<IIntroProvider> introProviders,
|
2013-05-21 03:16:43 +00:00
|
|
|
|
IEnumerable<IBaseItemComparer> itemComparers,
|
2014-02-09 23:08:01 +00:00
|
|
|
|
IEnumerable<ILibraryPostScanTask> postscanTasks);
|
2013-03-10 04:22:36 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Sorts the specified items.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="items">The items.</param>
|
|
|
|
|
/// <param name="user">The user.</param>
|
|
|
|
|
/// <param name="sortBy">The sort by.</param>
|
|
|
|
|
/// <param name="sortOrder">The sort order.</param>
|
|
|
|
|
/// <returns>IEnumerable{BaseItem}.</returns>
|
|
|
|
|
IEnumerable<BaseItem> Sort(IEnumerable<BaseItem> items, User user, IEnumerable<string> sortBy,
|
|
|
|
|
SortOrder sortOrder);
|
2013-03-12 04:26:23 +00:00
|
|
|
|
|
2013-03-15 19:08:49 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Ensure supplied item has only one instance throughout
|
|
|
|
|
/// </summary>
|
2013-05-21 03:16:43 +00:00
|
|
|
|
/// <param name="item">The item.</param>
|
2013-03-15 19:08:49 +00:00
|
|
|
|
/// <returns>The proper instance to the item</returns>
|
|
|
|
|
BaseItem GetOrAddByReferenceItem(BaseItem item);
|
2013-04-05 04:12:35 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the user root folder.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns>UserRootFolder.</returns>
|
2014-02-21 05:04:11 +00:00
|
|
|
|
Folder GetUserRootFolder();
|
2013-04-08 15:55:53 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2013-05-03 04:10:11 +00:00
|
|
|
|
/// Creates the item.
|
2013-04-08 15:55:53 +00:00
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="item">The item.</param>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
2013-05-03 04:10:11 +00:00
|
|
|
|
Task CreateItem(BaseItem item, CancellationToken cancellationToken);
|
2013-04-08 15:55:53 +00:00
|
|
|
|
|
2013-05-23 15:39:48 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Creates the items.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="items">The items.</param>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
|
Task CreateItems(IEnumerable<BaseItem> items, CancellationToken cancellationToken);
|
|
|
|
|
|
2013-05-03 04:10:11 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Updates the item.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="item">The item.</param>
|
2013-06-25 01:22:21 +00:00
|
|
|
|
/// <param name="updateReason">The update reason.</param>
|
2013-05-03 04:10:11 +00:00
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
2013-06-25 01:22:21 +00:00
|
|
|
|
Task UpdateItem(BaseItem item, ItemUpdateType updateReason, CancellationToken cancellationToken);
|
2013-05-21 03:16:43 +00:00
|
|
|
|
|
2013-04-08 15:55:53 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Retrieves the item.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="id">The id.</param>
|
2013-06-17 20:35:43 +00:00
|
|
|
|
/// <returns>BaseItem.</returns>
|
2013-06-26 16:08:16 +00:00
|
|
|
|
BaseItem RetrieveItem(Guid id);
|
2013-04-22 04:38:03 +00:00
|
|
|
|
|
2016-04-26 03:39:21 +00:00
|
|
|
|
bool IsScanRunning { get; }
|
|
|
|
|
|
2013-05-03 04:10:11 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Occurs when [item added].
|
|
|
|
|
/// </summary>
|
|
|
|
|
event EventHandler<ItemChangeEventArgs> ItemAdded;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Occurs when [item updated].
|
|
|
|
|
/// </summary>
|
|
|
|
|
event EventHandler<ItemChangeEventArgs> ItemUpdated;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Occurs when [item removed].
|
|
|
|
|
/// </summary>
|
|
|
|
|
event EventHandler<ItemChangeEventArgs> ItemRemoved;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Reports the item removed.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="item">The item.</param>
|
|
|
|
|
void ReportItemRemoved(BaseItem item);
|
2013-07-12 19:56:40 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Finds the type of the collection.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="item">The item.</param>
|
|
|
|
|
/// <returns>System.String.</returns>
|
2014-12-21 18:58:17 +00:00
|
|
|
|
string GetContentType(BaseItem item);
|
2013-11-13 16:45:41 +00:00
|
|
|
|
|
2014-12-21 18:58:17 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the type of the inherited content.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="item">The item.</param>
|
|
|
|
|
/// <returns>System.String.</returns>
|
|
|
|
|
string GetInheritedContentType(BaseItem item);
|
2015-01-10 01:38:01 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the type of the configured content.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="item">The item.</param>
|
|
|
|
|
/// <returns>System.String.</returns>
|
|
|
|
|
string GetConfiguredContentType(BaseItem item);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the type of the configured content.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="path">The path.</param>
|
|
|
|
|
/// <returns>System.String.</returns>
|
|
|
|
|
string GetConfiguredContentType(string path);
|
2016-04-26 03:39:21 +00:00
|
|
|
|
|
2013-11-21 20:48:26 +00:00
|
|
|
|
/// <summary>
|
2014-01-01 18:26:31 +00:00
|
|
|
|
/// Normalizes the root path list.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="paths">The paths.</param>
|
|
|
|
|
/// <returns>IEnumerable{System.String}.</returns>
|
2015-11-13 20:45:19 +00:00
|
|
|
|
IEnumerable<FileSystemMetadata> NormalizeRootPathList(IEnumerable<FileSystemMetadata> paths);
|
2014-01-11 05:49:18 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Registers the item.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="item">The item.</param>
|
|
|
|
|
void RegisterItem(BaseItem item);
|
2014-02-19 18:50:37 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Deletes the item.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="item">The item.</param>
|
2014-02-20 04:53:15 +00:00
|
|
|
|
/// <param name="options">The options.</param>
|
2014-02-19 18:50:37 +00:00
|
|
|
|
/// <returns>Task.</returns>
|
2014-02-20 04:53:15 +00:00
|
|
|
|
Task DeleteItem(BaseItem item, DeleteOptions options);
|
2014-03-19 04:59:45 +00:00
|
|
|
|
|
2014-06-07 19:46:24 +00:00
|
|
|
|
/// <summary>
|
2015-03-14 04:50:23 +00:00
|
|
|
|
/// Gets the named view.
|
2014-06-07 19:46:24 +00:00
|
|
|
|
/// </summary>
|
2014-10-29 22:01:02 +00:00
|
|
|
|
/// <param name="user">The user.</param>
|
2014-06-07 19:46:24 +00:00
|
|
|
|
/// <param name="name">The name.</param>
|
2014-10-29 22:01:02 +00:00
|
|
|
|
/// <param name="parentId">The parent identifier.</param>
|
2014-06-18 05:16:00 +00:00
|
|
|
|
/// <param name="viewType">Type of the view.</param>
|
2014-06-07 19:46:24 +00:00
|
|
|
|
/// <param name="sortName">Name of the sort.</param>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
2014-10-29 22:01:02 +00:00
|
|
|
|
/// <returns>Task<UserView>.</returns>
|
2015-03-14 04:50:23 +00:00
|
|
|
|
Task<UserView> GetNamedView(User user,
|
2014-10-29 22:01:02 +00:00
|
|
|
|
string name,
|
|
|
|
|
string parentId,
|
2016-04-26 03:39:21 +00:00
|
|
|
|
string viewType,
|
|
|
|
|
string sortName,
|
2014-10-29 22:01:02 +00:00
|
|
|
|
CancellationToken cancellationToken);
|
2014-09-05 03:48:53 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the named view.
|
|
|
|
|
/// </summary>
|
2015-03-14 04:50:23 +00:00
|
|
|
|
/// <param name="user">The user.</param>
|
2014-09-05 03:48:53 +00:00
|
|
|
|
/// <param name="name">The name.</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<UserView>.</returns>
|
2015-03-14 04:50:23 +00:00
|
|
|
|
Task<UserView> GetNamedView(User user,
|
2016-04-26 03:39:21 +00:00
|
|
|
|
string name,
|
|
|
|
|
string viewType,
|
2015-08-14 18:00:26 +00:00
|
|
|
|
string sortName,
|
|
|
|
|
CancellationToken cancellationToken);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the named view.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="name">The name.</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<UserView>.</returns>
|
|
|
|
|
Task<UserView> GetNamedView(string name,
|
|
|
|
|
string viewType,
|
|
|
|
|
string sortName,
|
|
|
|
|
CancellationToken cancellationToken);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the named view.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="name">The name.</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="uniqueId">The unique identifier.</param>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task<UserView>.</returns>
|
|
|
|
|
Task<UserView> GetNamedView(string name,
|
|
|
|
|
string parentId,
|
|
|
|
|
string viewType,
|
|
|
|
|
string sortName,
|
|
|
|
|
string uniqueId,
|
2014-10-29 22:01:02 +00:00
|
|
|
|
CancellationToken cancellationToken);
|
2014-11-16 20:44:08 +00:00
|
|
|
|
|
2015-10-16 04:46:41 +00:00
|
|
|
|
/// <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="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task<UserView>.</returns>
|
|
|
|
|
Task<UserView> GetShadowView(BaseItem parent,
|
|
|
|
|
string viewType,
|
|
|
|
|
string sortName,
|
|
|
|
|
CancellationToken cancellationToken);
|
2016-04-26 03:39:21 +00:00
|
|
|
|
|
2014-11-16 20:44:08 +00:00
|
|
|
|
/// <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);
|
|
|
|
|
|
2014-11-16 22:46:01 +00:00
|
|
|
|
/// <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>
|
2014-11-16 20:44:08 +00:00
|
|
|
|
bool IsAudioFile(string path);
|
|
|
|
|
|
2016-08-13 05:49:00 +00:00
|
|
|
|
bool IsAudioFile(string path, LibraryOptions libraryOptions);
|
|
|
|
|
bool IsVideoFile(string path, LibraryOptions libraryOptions);
|
|
|
|
|
|
2014-11-16 20:44:08 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the season number from path.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="path">The path.</param>
|
|
|
|
|
/// <returns>System.Nullable<System.Int32>.</returns>
|
|
|
|
|
int? GetSeasonNumberFromPath(string path);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2014-12-19 04:20:07 +00:00
|
|
|
|
/// Fills the missing episode numbers from path.
|
2014-11-16 20:44:08 +00:00
|
|
|
|
/// </summary>
|
2014-12-19 04:20:07 +00:00
|
|
|
|
/// <param name="episode">The episode.</param>
|
|
|
|
|
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
|
|
|
|
|
bool FillMissingEpisodeNumbersFromPath(Episode episode);
|
2014-11-16 22:46:01 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Parses the name.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="name">The name.</param>
|
|
|
|
|
/// <returns>ItemInfo.</returns>
|
|
|
|
|
ItemLookupInfo ParseName(string name);
|
2014-11-18 02:48:22 +00:00
|
|
|
|
|
2014-11-30 19:01:33 +00:00
|
|
|
|
/// <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);
|
2014-12-01 18:42:07 +00:00
|
|
|
|
|
|
|
|
|
/// <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<Trailer>.</returns>
|
2015-10-04 03:38:46 +00:00
|
|
|
|
IEnumerable<Video> FindTrailers(BaseItem owner, List<FileSystemMetadata> fileSystemChildren,
|
2014-12-01 18:42:07 +00:00
|
|
|
|
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<Video>.</returns>
|
2015-10-04 03:38:46 +00:00
|
|
|
|
IEnumerable<Video> FindExtras(BaseItem owner, List<FileSystemMetadata> fileSystemChildren,
|
2014-12-01 18:42:07 +00:00
|
|
|
|
IDirectoryService directoryService);
|
2015-02-15 03:36:07 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the collection folders.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="item">The item.</param>
|
|
|
|
|
/// <returns>IEnumerable<Folder>.</returns>
|
|
|
|
|
IEnumerable<Folder> GetCollectionFolders(BaseItem item);
|
2015-06-21 03:35:22 +00:00
|
|
|
|
|
2016-08-13 05:49:00 +00:00
|
|
|
|
LibraryOptions GetLibraryOptions(BaseItem item);
|
|
|
|
|
|
2015-06-21 03:35:22 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the people.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="item">The item.</param>
|
|
|
|
|
/// <returns>List<PersonInfo>.</returns>
|
|
|
|
|
List<PersonInfo> GetPeople(BaseItem item);
|
|
|
|
|
|
2015-07-08 16:10:34 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the people.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="query">The query.</param>
|
|
|
|
|
/// <returns>List<PersonInfo>.</returns>
|
|
|
|
|
List<PersonInfo> GetPeople(InternalPeopleQuery query);
|
2016-04-26 03:39:21 +00:00
|
|
|
|
|
2015-07-07 02:25:23 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the people items.
|
|
|
|
|
/// </summary>
|
2015-07-08 16:10:34 +00:00
|
|
|
|
/// <param name="query">The query.</param>
|
2015-07-07 02:25:23 +00:00
|
|
|
|
/// <returns>List<Person>.</returns>
|
2015-07-08 16:10:34 +00:00
|
|
|
|
List<Person> GetPeopleItems(InternalPeopleQuery query);
|
2016-04-26 03:39:21 +00:00
|
|
|
|
|
2015-06-21 03:35:22 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Updates the people.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="item">The item.</param>
|
|
|
|
|
/// <param name="people">The people.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
|
Task UpdatePeople(BaseItem item, List<PersonInfo> people);
|
2015-07-07 02:25:23 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the item ids.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="query">The query.</param>
|
|
|
|
|
/// <returns>List<Guid>.</returns>
|
|
|
|
|
List<Guid> GetItemIds(InternalItemsQuery query);
|
2015-07-08 16:10:34 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the people names.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="query">The query.</param>
|
|
|
|
|
/// <returns>List<System.String>.</returns>
|
|
|
|
|
List<string> GetPeopleNames(InternalPeopleQuery query);
|
2015-08-19 23:57:27 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Queries the items.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="query">The query.</param>
|
|
|
|
|
/// <returns>QueryResult<BaseItem>.</returns>
|
|
|
|
|
QueryResult<BaseItem> QueryItems(InternalItemsQuery query);
|
2015-10-04 03:38:46 +00:00
|
|
|
|
|
2016-09-23 06:21:54 +00:00
|
|
|
|
string GetPathAfterNetworkSubstitution(string path, BaseItem ownerItem = null);
|
2016-09-12 18:10:09 +00:00
|
|
|
|
|
2015-10-04 03:38:46 +00:00
|
|
|
|
/// <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);
|
2015-10-16 17:06:31 +00:00
|
|
|
|
|
|
|
|
|
/// <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);
|
2015-10-28 19:40:38 +00:00
|
|
|
|
|
2016-03-20 06:46:51 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the items.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="query">The query.</param>
|
|
|
|
|
/// <returns>QueryResult<BaseItem>.</returns>
|
|
|
|
|
IEnumerable<BaseItem> GetItemList(InternalItemsQuery query);
|
|
|
|
|
|
2015-10-28 19:40:38 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the items.
|
|
|
|
|
/// </summary>
|
2016-11-21 08:54:53 +00:00
|
|
|
|
IEnumerable<BaseItem> GetItemList(InternalItemsQuery query, List<BaseItem> parents);
|
2015-10-29 13:28:05 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the items result.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="query">The query.</param>
|
|
|
|
|
/// <returns>QueryResult<BaseItem>.</returns>
|
2016-03-20 06:46:51 +00:00
|
|
|
|
QueryResult<BaseItem> GetItemsResult(InternalItemsQuery query);
|
2016-04-26 03:39:21 +00:00
|
|
|
|
|
2015-11-04 23:49:06 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Ignores the file.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="file">The file.</param>
|
|
|
|
|
/// <param name="parent">The parent.</param>
|
|
|
|
|
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
|
|
|
|
|
bool IgnoreFile(FileSystemMetadata file, BaseItem parent);
|
2016-05-04 16:33:22 +00:00
|
|
|
|
|
2016-09-23 06:21:54 +00:00
|
|
|
|
void AddVirtualFolder(string name, string collectionType, LibraryOptions options, bool refreshLibrary);
|
2016-05-04 20:50:47 +00:00
|
|
|
|
void RemoveVirtualFolder(string name, bool refreshLibrary);
|
2016-09-23 06:21:54 +00:00
|
|
|
|
void AddMediaPath(string virtualFolderName, MediaPathInfo path);
|
2016-09-24 06:22:03 +00:00
|
|
|
|
void UpdateMediaPath(string virtualFolderName, MediaPathInfo path);
|
2016-05-04 20:50:47 +00:00
|
|
|
|
void RemoveMediaPath(string virtualFolderName, string path);
|
2016-06-17 13:06:13 +00:00
|
|
|
|
|
|
|
|
|
QueryResult<Tuple<BaseItem, ItemCounts>> GetGenres(InternalItemsQuery query);
|
|
|
|
|
QueryResult<Tuple<BaseItem, ItemCounts>> GetMusicGenres(InternalItemsQuery query);
|
|
|
|
|
QueryResult<Tuple<BaseItem, ItemCounts>> GetGameGenres(InternalItemsQuery query);
|
|
|
|
|
QueryResult<Tuple<BaseItem, ItemCounts>> GetStudios(InternalItemsQuery query);
|
|
|
|
|
QueryResult<Tuple<BaseItem, ItemCounts>> GetArtists(InternalItemsQuery query);
|
|
|
|
|
QueryResult<Tuple<BaseItem, ItemCounts>> GetAlbumArtists(InternalItemsQuery query);
|
2016-08-06 04:38:01 +00:00
|
|
|
|
QueryResult<Tuple<BaseItem, ItemCounts>> GetAllArtists(InternalItemsQuery query);
|
2016-09-07 05:48:14 +00:00
|
|
|
|
|
|
|
|
|
void RegisterIgnoredPath(string path);
|
|
|
|
|
void UnRegisterIgnoredPath(string path);
|
2016-12-12 19:40:27 +00:00
|
|
|
|
int GetCount(InternalItemsQuery query);
|
2014-02-20 04:53:15 +00:00
|
|
|
|
}
|
2013-02-28 19:32:41 +00:00
|
|
|
|
}
|