From c1dbb49315f90bf03445a960eb8eace86f1ea6f2 Mon Sep 17 00:00:00 2001 From: Shadowghost Date: Mon, 1 Apr 2024 20:43:05 +0200 Subject: Implement update endpoint --- .../Playlists/IPlaylistManager.cs | 29 +++++++++++----------- MediaBrowser.Controller/Playlists/Playlist.cs | 2 +- 2 files changed, 15 insertions(+), 16 deletions(-) (limited to 'MediaBrowser.Controller') diff --git a/MediaBrowser.Controller/Playlists/IPlaylistManager.cs b/MediaBrowser.Controller/Playlists/IPlaylistManager.cs index 1750be619..464620427 100644 --- a/MediaBrowser.Controller/Playlists/IPlaylistManager.cs +++ b/MediaBrowser.Controller/Playlists/IPlaylistManager.cs @@ -20,19 +20,25 @@ namespace MediaBrowser.Controller.Playlists Playlist GetPlaylist(Guid userId, Guid playlistId); /// - /// Gets the playlists. + /// Creates the playlist. /// - /// The user identifier. - /// IEnumerable<Playlist>. - IEnumerable GetPlaylists(Guid userId); + /// The . + /// Task<Playlist>. + Task CreatePlaylist(PlaylistCreationRequest request); /// - /// Toggle OpenAccess policy of the playlist. + /// Updates a playlist. /// - /// The playlist identifier. - /// The user identifier. + /// The . /// Task. - Task ToggleOpenAccess(Guid playlistId, Guid userId); + Task UpdatePlaylist(PlaylistUpdateRequest request); + + /// + /// Gets the playlists. + /// + /// The user identifier. + /// IEnumerable<Playlist>. + IEnumerable GetPlaylists(Guid userId); /// /// Adds a share to the playlist. @@ -52,13 +58,6 @@ namespace MediaBrowser.Controller.Playlists /// Task. Task RemoveFromShares(Guid playlistId, Guid userId, PlaylistUserPermissions share); - /// - /// Creates the playlist. - /// - /// The options. - /// Task<Playlist>. - Task CreatePlaylist(PlaylistCreationRequest options); - /// /// Adds to playlist. /// diff --git a/MediaBrowser.Controller/Playlists/Playlist.cs b/MediaBrowser.Controller/Playlists/Playlist.cs index b948d2e18..747dd9f63 100644 --- a/MediaBrowser.Controller/Playlists/Playlist.cs +++ b/MediaBrowser.Controller/Playlists/Playlist.cs @@ -252,7 +252,7 @@ namespace MediaBrowser.Controller.Playlists return false; } - return shares.Any(share => Guid.TryParse(share.UserId, out var id) && id.Equals(userId)); + return shares.Any(s => s.UserId.Equals(userId)); } public override bool IsVisibleStandalone(User user) -- cgit v1.2.3