2019-01-13 20:01:16 +00:00
|
|
|
using System;
|
2018-12-27 23:27:57 +00:00
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Threading.Tasks;
|
2019-01-13 19:25:32 +00:00
|
|
|
using MediaBrowser.Controller.Entities;
|
|
|
|
using MediaBrowser.Model.Playlists;
|
2018-12-27 23:27:57 +00:00
|
|
|
|
|
|
|
namespace MediaBrowser.Controller.Playlists
|
|
|
|
{
|
|
|
|
public interface IPlaylistManager
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the playlists.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="userId">The user identifier.</param>
|
|
|
|
/// <returns>IEnumerable<Playlist>.</returns>
|
|
|
|
IEnumerable<Playlist> GetPlaylists(Guid userId);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Creates the playlist.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="options">The options.</param>
|
|
|
|
/// <returns>Task<Playlist>.</returns>
|
|
|
|
Task<PlaylistCreationResult> CreatePlaylist(PlaylistCreationRequest options);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Adds to playlist.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="playlistId">The playlist identifier.</param>
|
|
|
|
/// <param name="itemIds">The item ids.</param>
|
|
|
|
/// <param name="userId">The user identifier.</param>
|
|
|
|
/// <returns>Task.</returns>
|
2020-03-13 22:14:25 +00:00
|
|
|
void AddToPlaylist(string playlistId, ICollection<Guid> itemIds, Guid userId);
|
2018-12-27 23:27:57 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Removes from playlist.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="playlistId">The playlist identifier.</param>
|
|
|
|
/// <param name="entryIds">The entry ids.</param>
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
void RemoveFromPlaylist(string playlistId, IEnumerable<string> entryIds);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the playlists folder.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="userId">The user identifier.</param>
|
|
|
|
/// <returns>Folder.</returns>
|
|
|
|
Folder GetPlaylistsFolder(Guid userId);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Moves the item.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="playlistId">The playlist identifier.</param>
|
|
|
|
/// <param name="entryId">The entry identifier.</param>
|
|
|
|
/// <param name="newIndex">The new index.</param>
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
void MoveItem(string playlistId, string entryId, int newIndex);
|
|
|
|
}
|
|
|
|
}
|