2020-08-22 19:56:24 +00:00
|
|
|
#pragma warning disable CS1591
|
|
|
|
|
2019-01-13 19:25:32 +00:00
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Threading;
|
|
|
|
using System.Threading.Tasks;
|
2020-05-20 17:07:53 +00:00
|
|
|
using Jellyfin.Data.Entities;
|
2020-07-01 01:44:41 +00:00
|
|
|
using Jellyfin.Data.Enums;
|
2019-01-13 19:25:32 +00:00
|
|
|
using MediaBrowser.Controller.Dto;
|
2019-01-06 20:50:43 +00:00
|
|
|
using MediaBrowser.Controller.Entities;
|
2018-12-27 23:27:57 +00:00
|
|
|
using MediaBrowser.Controller.Entities.Audio;
|
|
|
|
using MediaBrowser.Controller.Providers;
|
|
|
|
using MediaBrowser.Controller.Resolvers;
|
|
|
|
using MediaBrowser.Controller.Sorting;
|
|
|
|
using MediaBrowser.Model.Configuration;
|
|
|
|
using MediaBrowser.Model.Dto;
|
2019-01-13 19:25:32 +00:00
|
|
|
using MediaBrowser.Model.Entities;
|
2018-12-27 23:27:57 +00:00
|
|
|
using MediaBrowser.Model.IO;
|
2019-01-13 19:25:32 +00:00
|
|
|
using MediaBrowser.Model.Querying;
|
2020-05-20 17:07:53 +00:00
|
|
|
using Episode = MediaBrowser.Controller.Entities.TV.Episode;
|
|
|
|
using Genre = MediaBrowser.Controller.Entities.Genre;
|
|
|
|
using Person = MediaBrowser.Controller.Entities.Person;
|
2018-12-27 23:27:57 +00:00
|
|
|
|
|
|
|
namespace MediaBrowser.Controller.Library
|
|
|
|
{
|
|
|
|
/// <summary>
|
2020-06-15 22:37:52 +00:00
|
|
|
/// Interface ILibraryManager.
|
2018-12-27 23:27:57 +00:00
|
|
|
/// </summary>
|
|
|
|
public interface ILibraryManager
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Resolves the path.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="fileInfo">The file information.</param>
|
|
|
|
/// <param name="parent">The parent.</param>
|
|
|
|
/// <returns>BaseItem.</returns>
|
2020-06-08 02:32:06 +00:00
|
|
|
BaseItem ResolvePath(
|
|
|
|
FileSystemMetadata fileInfo,
|
2020-06-25 09:33:10 +00:00
|
|
|
Folder parent = null);
|
2018-12-27 23:27:57 +00:00
|
|
|
|
|
|
|
/// <summary>
|
2020-06-15 22:37:52 +00:00
|
|
|
/// Resolves a set of files into a list of BaseItem.
|
2018-12-27 23:27:57 +00:00
|
|
|
/// </summary>
|
2020-06-08 02:32:06 +00:00
|
|
|
IEnumerable<BaseItem> ResolvePaths(
|
|
|
|
IEnumerable<FileSystemMetadata> files,
|
2018-12-27 23:27:57 +00:00
|
|
|
IDirectoryService directoryService,
|
|
|
|
Folder parent,
|
|
|
|
LibraryOptions libraryOptions,
|
|
|
|
string collectionType = null);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the root folder.
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The root folder.</value>
|
|
|
|
AggregateFolder RootFolder { get; }
|
|
|
|
|
|
|
|
/// <summary>
|
2020-06-15 22:37:52 +00:00
|
|
|
/// Gets a Person.
|
2018-12-27 23:27:57 +00:00
|
|
|
/// </summary>
|
|
|
|
/// <param name="name">The name.</param>
|
|
|
|
/// <returns>Task{Person}.</returns>
|
|
|
|
Person GetPerson(string name);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Finds the by path.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="path">The path.</param>
|
2020-08-22 19:56:24 +00:00
|
|
|
/// <param name="isFolder"><c>true</c> is the path is a directory; otherwise <c>false</c>.</param>
|
2018-12-27 23:27:57 +00:00
|
|
|
/// <returns>BaseItem.</returns>
|
|
|
|
BaseItem FindByPath(string path, bool? isFolder);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the artist.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="name">The name.</param>
|
|
|
|
/// <returns>Task{Artist}.</returns>
|
|
|
|
MusicArtist GetArtist(string name);
|
2020-08-21 20:01:19 +00:00
|
|
|
|
2018-12-27 23:27:57 +00:00
|
|
|
MusicArtist GetArtist(string name, DtoOptions options);
|
2020-09-28 20:04:31 +00:00
|
|
|
|
2018-12-27 23:27:57 +00:00
|
|
|
/// <summary>
|
2020-06-15 22:37:52 +00:00
|
|
|
/// Gets a Studio.
|
2018-12-27 23:27:57 +00:00
|
|
|
/// </summary>
|
|
|
|
/// <param name="name">The name.</param>
|
|
|
|
/// <returns>Task{Studio}.</returns>
|
|
|
|
Studio GetStudio(string name);
|
|
|
|
|
|
|
|
/// <summary>
|
2020-06-15 22:37:52 +00:00
|
|
|
/// Gets a Genre.
|
2018-12-27 23:27:57 +00:00
|
|
|
/// </summary>
|
|
|
|
/// <param name="name">The name.</param>
|
|
|
|
/// <returns>Task{Genre}.</returns>
|
|
|
|
Genre GetGenre(string name);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the genre.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="name">The name.</param>
|
|
|
|
/// <returns>Task{MusicGenre}.</returns>
|
|
|
|
MusicGenre GetMusicGenre(string name);
|
|
|
|
|
|
|
|
/// <summary>
|
2020-06-15 22:37:52 +00:00
|
|
|
/// Gets a Year.
|
2018-12-27 23:27:57 +00:00
|
|
|
/// </summary>
|
|
|
|
/// <param name="value">The value.</param>
|
|
|
|
/// <returns>Task{Year}.</returns>
|
2019-01-13 20:37:13 +00:00
|
|
|
/// <exception cref="ArgumentOutOfRangeException"></exception>
|
2018-12-27 23:27:57 +00:00
|
|
|
Year GetYear(int value);
|
|
|
|
|
|
|
|
/// <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>
|
2020-06-15 22:37:52 +00:00
|
|
|
/// Reloads the root media folder.
|
2018-12-27 23:27:57 +00:00
|
|
|
/// </summary>
|
|
|
|
/// <param name="progress">The progress.</param>
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
Task ValidateMediaLibrary(IProgress<double> progress, CancellationToken cancellationToken);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Queues the library scan.
|
|
|
|
/// </summary>
|
|
|
|
void QueueLibraryScan();
|
|
|
|
|
2020-08-21 20:01:19 +00:00
|
|
|
Task UpdateImagesAsync(BaseItem item, bool forceUpdate = false);
|
2018-12-27 23:27:57 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the default view.
|
|
|
|
/// </summary>
|
|
|
|
/// <returns>IEnumerable{VirtualFolderInfo}.</returns>
|
|
|
|
List<VirtualFolderInfo> GetVirtualFolders();
|
|
|
|
|
|
|
|
List<VirtualFolderInfo> GetVirtualFolders(bool includeRefreshState);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the item by id.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="id">The id.</param>
|
|
|
|
/// <returns>BaseItem.</returns>
|
|
|
|
BaseItem GetItemById(Guid id);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the intros.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="item">The item.</param>
|
|
|
|
/// <param name="user">The user.</param>
|
|
|
|
/// <returns>IEnumerable{System.String}.</returns>
|
2020-05-20 17:07:53 +00:00
|
|
|
Task<IEnumerable<Video>> GetIntros(BaseItem item, User user);
|
2018-12-27 23:27:57 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets all intro files.
|
|
|
|
/// </summary>
|
|
|
|
/// <returns>IEnumerable{System.String}.</returns>
|
|
|
|
IEnumerable<string> GetAllIntroFiles();
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Adds the parts.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="rules">The rules.</param>
|
|
|
|
/// <param name="resolvers">The resolvers.</param>
|
|
|
|
/// <param name="introProviders">The intro providers.</param>
|
|
|
|
/// <param name="itemComparers">The item comparers.</param>
|
|
|
|
/// <param name="postscanTasks">The postscan tasks.</param>
|
2020-02-19 20:56:35 +00:00
|
|
|
void AddParts(
|
|
|
|
IEnumerable<IResolverIgnoreRule> rules,
|
2018-12-27 23:27:57 +00:00
|
|
|
IEnumerable<IItemResolver> resolvers,
|
|
|
|
IEnumerable<IIntroProvider> introProviders,
|
|
|
|
IEnumerable<IBaseItemComparer> itemComparers,
|
|
|
|
IEnumerable<ILibraryPostScanTask> postscanTasks);
|
|
|
|
|
|
|
|
/// <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>
|
2020-05-20 17:07:53 +00:00
|
|
|
IEnumerable<BaseItem> Sort(IEnumerable<BaseItem> items, User user, IEnumerable<string> sortBy, SortOrder sortOrder);
|
2020-08-21 20:01:19 +00:00
|
|
|
|
2020-05-20 17:07:53 +00:00
|
|
|
IEnumerable<BaseItem> Sort(IEnumerable<BaseItem> items, User user, IEnumerable<ValueTuple<string, SortOrder>> orderBy);
|
2018-12-27 23:27:57 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the user root folder.
|
|
|
|
/// </summary>
|
|
|
|
/// <returns>UserRootFolder.</returns>
|
|
|
|
Folder GetUserRootFolder();
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Creates the item.
|
|
|
|
/// </summary>
|
|
|
|
void CreateItem(BaseItem item, BaseItem parent);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Creates the items.
|
|
|
|
/// </summary>
|
2020-09-09 11:38:27 +00:00
|
|
|
void CreateItems(IReadOnlyList<BaseItem> items, BaseItem parent, CancellationToken cancellationToken);
|
2018-12-27 23:27:57 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Updates the item.
|
|
|
|
/// </summary>
|
2020-08-21 20:01:19 +00:00
|
|
|
Task UpdateItemsAsync(IReadOnlyList<BaseItem> items, BaseItem parent, ItemUpdateType updateReason, CancellationToken cancellationToken);
|
2020-05-19 11:50:14 +00:00
|
|
|
|
2020-08-21 20:01:19 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Updates the item.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="item">The item.</param>
|
|
|
|
/// <param name="parent">The parent item.</param>
|
|
|
|
/// <param name="updateReason">The update reason.</param>
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
Task UpdateItemAsync(BaseItem item, BaseItem parent, ItemUpdateType updateReason, CancellationToken cancellationToken);
|
2018-12-27 23:27:57 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Retrieves the item.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="id">The id.</param>
|
|
|
|
/// <returns>BaseItem.</returns>
|
|
|
|
BaseItem RetrieveItem(Guid id);
|
|
|
|
|
|
|
|
bool IsScanRunning { get; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Occurs when [item added].
|
|
|
|
/// </summary>
|
|
|
|
event EventHandler<ItemChangeEventArgs> ItemAdded;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Occurs when [item updated].
|
|
|
|
/// </summary>
|
|
|
|
event EventHandler<ItemChangeEventArgs> ItemUpdated;
|
2020-09-28 20:04:31 +00:00
|
|
|
|
2018-12-27 23:27:57 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Occurs when [item removed].
|
|
|
|
/// </summary>
|
|
|
|
event EventHandler<ItemChangeEventArgs> ItemRemoved;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Finds the type of the collection.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="item">The item.</param>
|
|
|
|
/// <returns>System.String.</returns>
|
|
|
|
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>
|
|
|
|
/// 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);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Normalizes the root path list.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="paths">The paths.</param>
|
|
|
|
/// <returns>IEnumerable{System.String}.</returns>
|
|
|
|
List<FileSystemMetadata> NormalizeRootPathList(IEnumerable<FileSystemMetadata> paths);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Registers the item.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="item">The item.</param>
|
|
|
|
void RegisterItem(BaseItem item);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Deletes the item.
|
|
|
|
/// </summary>
|
|
|
|
void DeleteItem(BaseItem item, DeleteOptions options);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Deletes the item.
|
|
|
|
/// </summary>
|
|
|
|
void DeleteItem(BaseItem item, DeleteOptions options, bool notifyParentItem);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Deletes the item.
|
|
|
|
/// </summary>
|
|
|
|
void DeleteItem(BaseItem item, DeleteOptions options, BaseItem parent, bool notifyParentItem);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the named view.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="user">The user.</param>
|
|
|
|
/// <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>
|
2020-05-13 02:10:35 +00:00
|
|
|
UserView GetNamedView(
|
2020-05-20 17:07:53 +00:00
|
|
|
User user,
|
2018-12-27 23:27:57 +00:00
|
|
|
string name,
|
|
|
|
Guid parentId,
|
|
|
|
string viewType,
|
2019-01-06 20:50:43 +00:00
|
|
|
string sortName);
|
2018-12-27 23:27:57 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the named view.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="user">The user.</param>
|
|
|
|
/// <param name="name">The name.</param>
|
|
|
|
/// <param name="viewType">Type of the view.</param>
|
|
|
|
/// <param name="sortName">Name of the sort.</param>
|
2020-05-13 02:10:35 +00:00
|
|
|
UserView GetNamedView(
|
2020-05-20 17:07:53 +00:00
|
|
|
User user,
|
2018-12-27 23:27:57 +00:00
|
|
|
string name,
|
|
|
|
string viewType,
|
|
|
|
string sortName);
|
|
|
|
|
|
|
|
/// <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>
|
2020-08-21 20:01:19 +00:00
|
|
|
UserView GetNamedView(
|
|
|
|
string name,
|
2018-12-27 23:27:57 +00:00
|
|
|
string viewType,
|
|
|
|
string sortName);
|
|
|
|
|
|
|
|
/// <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>
|
2020-08-21 20:01:19 +00:00
|
|
|
UserView GetNamedView(
|
|
|
|
string name,
|
2018-12-27 23:27:57 +00:00
|
|
|
Guid parentId,
|
|
|
|
string viewType,
|
|
|
|
string sortName,
|
|
|
|
string uniqueId);
|
|
|
|
|
|
|
|
/// <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>
|
2020-08-21 20:01:19 +00:00
|
|
|
UserView GetShadowView(
|
|
|
|
BaseItem parent,
|
2018-12-27 23:27:57 +00:00
|
|
|
string viewType,
|
|
|
|
string sortName);
|
|
|
|
|
|
|
|
/// <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<System.Int32>.</returns>
|
|
|
|
int? GetSeasonNumberFromPath(string path);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Fills the missing episode numbers from path.
|
|
|
|
/// </summary>
|
|
|
|
bool FillMissingEpisodeNumbersFromPath(Episode episode, bool forceRefresh);
|
|
|
|
|
|
|
|
/// <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<Trailer>.</returns>
|
2020-08-21 20:01:19 +00:00
|
|
|
IEnumerable<Video> FindTrailers(
|
|
|
|
BaseItem owner,
|
|
|
|
List<FileSystemMetadata> fileSystemChildren,
|
2018-12-27 23:27:57 +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>
|
2020-08-21 20:01:19 +00:00
|
|
|
IEnumerable<Video> FindExtras(
|
|
|
|
BaseItem owner,
|
|
|
|
List<FileSystemMetadata> fileSystemChildren,
|
2018-12-27 23:27:57 +00:00
|
|
|
IDirectoryService directoryService);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the collection folders.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="item">The item.</param>
|
|
|
|
/// <returns>IEnumerable<Folder>.</returns>
|
|
|
|
List<Folder> GetCollectionFolders(BaseItem item);
|
|
|
|
|
|
|
|
List<Folder> GetCollectionFolders(BaseItem item, List<Folder> allUserRootChildren);
|
|
|
|
|
|
|
|
LibraryOptions GetLibraryOptions(BaseItem item);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the people.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="item">The item.</param>
|
|
|
|
/// <returns>List<PersonInfo>.</returns>
|
|
|
|
List<PersonInfo> GetPeople(BaseItem item);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the people.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="query">The query.</param>
|
|
|
|
/// <returns>List<PersonInfo>.</returns>
|
|
|
|
List<PersonInfo> GetPeople(InternalPeopleQuery query);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the people items.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="query">The query.</param>
|
|
|
|
/// <returns>List<Person>.</returns>
|
|
|
|
List<Person> GetPeopleItems(InternalPeopleQuery query);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Updates the people.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="item">The item.</param>
|
|
|
|
/// <param name="people">The people.</param>
|
|
|
|
void UpdatePeople(BaseItem item, List<PersonInfo> people);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the item ids.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="query">The query.</param>
|
|
|
|
/// <returns>List<Guid>.</returns>
|
|
|
|
List<Guid> GetItemIds(InternalItemsQuery query);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the people names.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="query">The query.</param>
|
|
|
|
/// <returns>List<System.String>.</returns>
|
|
|
|
List<string> GetPeopleNames(InternalPeopleQuery query);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Queries the items.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="query">The query.</param>
|
|
|
|
/// <returns>QueryResult<BaseItem>.</returns>
|
|
|
|
QueryResult<BaseItem> QueryItems(InternalItemsQuery query);
|
|
|
|
|
|
|
|
string GetPathAfterNetworkSubstitution(string path, BaseItem ownerItem = null);
|
|
|
|
|
|
|
|
/// <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(BaseItem item, ItemImageInfo image, int imageIndex);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the items.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="query">The query.</param>
|
|
|
|
/// <returns>QueryResult<BaseItem>.</returns>
|
|
|
|
List<BaseItem> GetItemList(InternalItemsQuery query);
|
|
|
|
|
|
|
|
List<BaseItem> GetItemList(InternalItemsQuery query, bool allowExternalContent);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the items.
|
|
|
|
/// </summary>
|
|
|
|
List<BaseItem> GetItemList(InternalItemsQuery query, List<BaseItem> parents);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the items result.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="query">The query.</param>
|
|
|
|
/// <returns>QueryResult<BaseItem>.</returns>
|
|
|
|
QueryResult<BaseItem> GetItemsResult(InternalItemsQuery query);
|
|
|
|
|
|
|
|
/// <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);
|
|
|
|
|
|
|
|
Guid GetStudioId(string name);
|
|
|
|
|
|
|
|
Guid GetGenreId(string name);
|
|
|
|
|
|
|
|
Guid GetMusicGenreId(string name);
|
|
|
|
|
2021-02-24 01:05:12 +00:00
|
|
|
Task AddVirtualFolder(string name, CollectionTypeOptions? collectionType, LibraryOptions options, bool refreshLibrary);
|
2020-08-21 20:01:19 +00:00
|
|
|
|
2018-12-27 23:27:57 +00:00
|
|
|
Task RemoveVirtualFolder(string name, bool refreshLibrary);
|
2020-08-21 20:01:19 +00:00
|
|
|
|
2018-12-27 23:27:57 +00:00
|
|
|
void AddMediaPath(string virtualFolderName, MediaPathInfo path);
|
2020-08-21 20:01:19 +00:00
|
|
|
|
2018-12-27 23:27:57 +00:00
|
|
|
void UpdateMediaPath(string virtualFolderName, MediaPathInfo path);
|
2020-08-21 20:01:19 +00:00
|
|
|
|
2018-12-27 23:27:57 +00:00
|
|
|
void RemoveMediaPath(string virtualFolderName, string path);
|
|
|
|
|
2019-02-08 23:48:09 +00:00
|
|
|
QueryResult<(BaseItem, ItemCounts)> GetGenres(InternalItemsQuery query);
|
2020-08-21 20:01:19 +00:00
|
|
|
|
2019-02-08 23:48:09 +00:00
|
|
|
QueryResult<(BaseItem, ItemCounts)> GetMusicGenres(InternalItemsQuery query);
|
2020-08-21 20:01:19 +00:00
|
|
|
|
2019-02-08 23:48:09 +00:00
|
|
|
QueryResult<(BaseItem, ItemCounts)> GetStudios(InternalItemsQuery query);
|
2020-08-21 20:01:19 +00:00
|
|
|
|
2019-02-08 23:48:09 +00:00
|
|
|
QueryResult<(BaseItem, ItemCounts)> GetArtists(InternalItemsQuery query);
|
2020-08-21 20:01:19 +00:00
|
|
|
|
2019-02-08 23:48:09 +00:00
|
|
|
QueryResult<(BaseItem, ItemCounts)> GetAlbumArtists(InternalItemsQuery query);
|
2020-08-21 20:01:19 +00:00
|
|
|
|
2019-02-08 23:48:09 +00:00
|
|
|
QueryResult<(BaseItem, ItemCounts)> GetAllArtists(InternalItemsQuery query);
|
2018-12-27 23:27:57 +00:00
|
|
|
|
|
|
|
int GetCount(InternalItemsQuery query);
|
|
|
|
|
2020-10-12 18:05:11 +00:00
|
|
|
void AddExternalSubtitleStreams(
|
|
|
|
List<MediaStream> streams,
|
2018-12-27 23:27:57 +00:00
|
|
|
string videoPath,
|
|
|
|
string[] files);
|
2020-10-03 11:36:53 +00:00
|
|
|
|
2020-12-10 13:47:47 +00:00
|
|
|
Task RunMetadataSavers(BaseItem item, ItemUpdateType updateReason);
|
2020-11-21 22:20:31 +00:00
|
|
|
|
2020-11-05 11:27:22 +00:00
|
|
|
BaseItem GetParentItem(string parentId, Guid? userId);
|
2020-12-01 18:07:41 +00:00
|
|
|
|
|
|
|
BaseItem GetParentItem(Guid? parentId, Guid? userId);
|
2018-12-27 23:27:57 +00:00
|
|
|
}
|
2019-01-06 20:50:43 +00:00
|
|
|
}
|