aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/PlaylistsController.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Jellyfin.Api/Controllers/PlaylistsController.cs')
-rw-r--r--Jellyfin.Api/Controllers/PlaylistsController.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/Jellyfin.Api/Controllers/PlaylistsController.cs b/Jellyfin.Api/Controllers/PlaylistsController.cs
index 1100f85cf..abf94a32f 100644
--- a/Jellyfin.Api/Controllers/PlaylistsController.cs
+++ b/Jellyfin.Api/Controllers/PlaylistsController.cs
@@ -482,8 +482,13 @@ public class PlaylistsController : BaseJellyfinApiController
var user = userId.IsNullOrEmpty()
? null
: _userManager.GetUserById(userId.Value);
+ var item = _libraryManager.GetItemById<Playlist>(playlistId, user);
+ if (item is null)
+ {
+ return NotFound();
+ }
- var items = playlist.GetManageableItems().ToArray();
+ var items = item.GetManageableItems().ToArray();
var count = items.Length;
if (startIndex.HasValue)
{