Fix playlist creation and removal

This commit is contained in:
Shadowghost
2023-03-10 17:46:59 +01:00
parent 6351d1022b
commit 76ae599bd3
11 changed files with 137 additions and 54 deletions

View File

@@ -1,11 +0,0 @@
#nullable disable
#pragma warning disable CA1819, CS1591
namespace MediaBrowser.Controller.Entities
{
public interface IHasShares
{
Share[] Shares { get; set; }
}
}

View File

@@ -1,13 +0,0 @@
#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Controller.Entities
{
public class Share
{
public string UserId { get; set; }
public bool CanEdit { get; set; }
}
}

View File

@@ -56,5 +56,13 @@ namespace MediaBrowser.Controller.Playlists
/// <param name="newIndex">The new index.</param>
/// <returns>Task.</returns>
Task MoveItemAsync(string playlistId, string entryId, int newIndex);
/// <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>
Task RemovePlaylists(Guid userId);
}
}

View File

@@ -15,6 +15,7 @@ using MediaBrowser.Controller.Dto;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities.Audio;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Querying;
namespace MediaBrowser.Controller.Playlists