ICollectionManager.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using System;
  2. using System.Collections.Generic;
  3. using Jellyfin.Data.Entities;
  4. using MediaBrowser.Controller.Entities;
  5. using MediaBrowser.Controller.Entities.Movies;
  6. namespace MediaBrowser.Controller.Collections
  7. {
  8. public interface ICollectionManager
  9. {
  10. /// <summary>
  11. /// Occurs when [collection created].
  12. /// </summary>
  13. event EventHandler<CollectionCreatedEventArgs> CollectionCreated;
  14. /// <summary>
  15. /// Occurs when [items added to collection].
  16. /// </summary>
  17. event EventHandler<CollectionModifiedEventArgs> ItemsAddedToCollection;
  18. /// <summary>
  19. /// Occurs when [items removed from collection].
  20. /// </summary>
  21. event EventHandler<CollectionModifiedEventArgs> ItemsRemovedFromCollection;
  22. /// <summary>
  23. /// Creates the collection.
  24. /// </summary>
  25. /// <param name="options">The options.</param>
  26. BoxSet CreateCollection(CollectionCreationOptions options);
  27. /// <summary>
  28. /// Adds to collection.
  29. /// </summary>
  30. /// <param name="collectionId">The collection identifier.</param>
  31. /// <param name="itemIds">The item ids.</param>
  32. void AddToCollection(Guid collectionId, IEnumerable<string> itemIds);
  33. /// <summary>
  34. /// Removes from collection.
  35. /// </summary>
  36. /// <param name="collectionId">The collection identifier.</param>
  37. /// <param name="itemIds">The item ids.</param>
  38. void RemoveFromCollection(Guid collectionId, IEnumerable<string> itemIds);
  39. void AddToCollection(Guid collectionId, IEnumerable<Guid> itemIds);
  40. void RemoveFromCollection(Guid collectionId, IEnumerable<Guid> itemIds);
  41. /// <summary>
  42. /// Collapses the items within box sets.
  43. /// </summary>
  44. /// <param name="items">The items.</param>
  45. /// <param name="user">The user.</param>
  46. /// <returns>IEnumerable{BaseItem}.</returns>
  47. IEnumerable<BaseItem> CollapseItemsWithinBoxSets(IEnumerable<BaseItem> items, User user);
  48. }
  49. }