IPlaylistManager.cs 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Threading.Tasks;
  4. using MediaBrowser.Controller.Entities;
  5. using MediaBrowser.Model.Playlists;
  6. namespace MediaBrowser.Controller.Playlists
  7. {
  8. public interface IPlaylistManager
  9. {
  10. /// <summary>
  11. /// Gets the playlists.
  12. /// </summary>
  13. /// <param name="userId">The user identifier.</param>
  14. /// <returns>IEnumerable&lt;Playlist&gt;.</returns>
  15. IEnumerable<Playlist> GetPlaylists(Guid userId);
  16. /// <summary>
  17. /// Creates the playlist.
  18. /// </summary>
  19. /// <param name="options">The options.</param>
  20. /// <returns>Task&lt;Playlist&gt;.</returns>
  21. Task<PlaylistCreationResult> CreatePlaylist(PlaylistCreationRequest options);
  22. /// <summary>
  23. /// Adds to playlist.
  24. /// </summary>
  25. /// <param name="playlistId">The playlist identifier.</param>
  26. /// <param name="itemIds">The item ids.</param>
  27. /// <param name="userId">The user identifier.</param>
  28. /// <returns>Task.</returns>
  29. void AddToPlaylist(string playlistId, IEnumerable<Guid> itemIds, Guid userId);
  30. /// <summary>
  31. /// Removes from playlist.
  32. /// </summary>
  33. /// <param name="playlistId">The playlist identifier.</param>
  34. /// <param name="entryIds">The entry ids.</param>
  35. /// <returns>Task.</returns>
  36. void RemoveFromPlaylist(string playlistId, IEnumerable<string> entryIds);
  37. /// <summary>
  38. /// Gets the playlists folder.
  39. /// </summary>
  40. /// <param name="userId">The user identifier.</param>
  41. /// <returns>Folder.</returns>
  42. Folder GetPlaylistsFolder(Guid userId);
  43. /// <summary>
  44. /// Moves the item.
  45. /// </summary>
  46. /// <param name="playlistId">The playlist identifier.</param>
  47. /// <param name="entryId">The entry identifier.</param>
  48. /// <param name="newIndex">The new index.</param>
  49. /// <returns>Task.</returns>
  50. void MoveItem(string playlistId, string entryId, int newIndex);
  51. }
  52. }