2021-05-06 22:39:20 +00:00
|
|
|
#nullable disable
|
|
|
|
|
2020-08-22 19:56:24 +00:00
|
|
|
#pragma warning disable CS1591
|
|
|
|
|
2019-01-13 20:01:16 +00:00
|
|
|
using System;
|
2018-12-27 23:27:57 +00:00
|
|
|
using System.Collections.Generic;
|
2020-08-21 20:01:19 +00:00
|
|
|
using System.Threading.Tasks;
|
2020-05-20 17:07:53 +00:00
|
|
|
using Jellyfin.Data.Entities;
|
2019-01-13 19:25:32 +00:00
|
|
|
using MediaBrowser.Controller.Entities;
|
|
|
|
using MediaBrowser.Controller.Entities.Movies;
|
2018-12-27 23:27:57 +00:00
|
|
|
|
|
|
|
namespace MediaBrowser.Controller.Collections
|
|
|
|
{
|
|
|
|
public interface ICollectionManager
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Occurs when [collection created].
|
|
|
|
/// </summary>
|
|
|
|
event EventHandler<CollectionCreatedEventArgs> CollectionCreated;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Occurs when [items added to collection].
|
|
|
|
/// </summary>
|
|
|
|
event EventHandler<CollectionModifiedEventArgs> ItemsAddedToCollection;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Occurs when [items removed from collection].
|
|
|
|
/// </summary>
|
|
|
|
event EventHandler<CollectionModifiedEventArgs> ItemsRemovedFromCollection;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Creates the collection.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="options">The options.</param>
|
2020-08-21 20:01:19 +00:00
|
|
|
Task<BoxSet> CreateCollectionAsync(CollectionCreationOptions options);
|
2018-12-27 23:27:57 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Adds to collection.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="collectionId">The collection identifier.</param>
|
|
|
|
/// <param name="itemIds">The item ids.</param>
|
2020-08-21 20:01:19 +00:00
|
|
|
/// <returns><see cref="Task"/> representing the asynchronous operation.</returns>
|
|
|
|
Task AddToCollectionAsync(Guid collectionId, IEnumerable<Guid> itemIds);
|
2018-12-27 23:27:57 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Removes from collection.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="collectionId">The collection identifier.</param>
|
|
|
|
/// <param name="itemIds">The item ids.</param>
|
2020-08-21 20:01:19 +00:00
|
|
|
/// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
|
|
|
|
Task RemoveFromCollectionAsync(Guid collectionId, IEnumerable<Guid> itemIds);
|
2018-12-27 23:27:57 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Collapses the items within box sets.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="items">The items.</param>
|
|
|
|
/// <param name="user">The user.</param>
|
|
|
|
/// <returns>IEnumerable{BaseItem}.</returns>
|
2020-05-20 17:07:53 +00:00
|
|
|
IEnumerable<BaseItem> CollapseItemsWithinBoxSets(IEnumerable<BaseItem> items, User user);
|
2018-12-27 23:27:57 +00:00
|
|
|
}
|
|
|
|
}
|