2020-08-22 21:56:24 +02:00
|
|
|
#pragma warning disable CS1591
|
|
|
|
|
2019-01-13 21:01:16 +01:00
|
|
|
using System;
|
2018-12-28 00:27:57 +01:00
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Threading.Tasks;
|
2019-01-13 20:25:32 +01:00
|
|
|
using MediaBrowser.Controller.Entities;
|
|
|
|
using MediaBrowser.Model.Playlists;
|
2018-12-28 00:27:57 +01: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-11-17 04:29:46 +01:00
|
|
|
Task AddToPlaylistAsync(Guid playlistId, IReadOnlyCollection<Guid> itemIds, Guid userId);
|
2018-12-28 00:27:57 +01:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Removes from playlist.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="playlistId">The playlist identifier.</param>
|
|
|
|
/// <param name="entryIds">The entry ids.</param>
|
|
|
|
/// <returns>Task.</returns>
|
2020-08-21 22:01:19 +02:00
|
|
|
Task RemoveFromPlaylistAsync(string playlistId, IEnumerable<string> entryIds);
|
2018-12-28 00:27:57 +01:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the playlists folder.
|
|
|
|
/// </summary>
|
2023-09-16 15:08:45 +02:00
|
|
|
/// <returns>Folder.</returns>
|
|
|
|
Folder GetPlaylistsFolder();
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the playlists folder for a user.
|
|
|
|
/// </summary>
|
2018-12-28 00:27:57 +01:00
|
|
|
/// <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>
|
2020-08-21 22:01:19 +02:00
|
|
|
Task MoveItemAsync(string playlistId, string entryId, int newIndex);
|
2023-03-10 17:46:59 +01:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Removed all playlists of a user.
|
|
|
|
/// If the playlist is shared, ownership is transferred.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="userId">The user id.</param>
|
|
|
|
/// <returns>Task.</returns>
|
2023-03-12 19:42:18 +01:00
|
|
|
Task RemovePlaylistsAsync(Guid userId);
|
2023-03-10 19:16:57 +01:00
|
|
|
|
|
|
|
/// <summary>
|
2023-05-15 14:45:33 +02:00
|
|
|
/// Saves a playlist.
|
2023-03-10 19:16:57 +01:00
|
|
|
/// </summary>
|
2023-05-15 14:45:33 +02:00
|
|
|
/// <param name="item">The playlist.</param>
|
|
|
|
void SavePlaylistFile(Playlist item);
|
2018-12-28 00:27:57 +01:00
|
|
|
}
|
|
|
|
}
|