aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Server.Implementations')
-rw-r--r--Emby.Server.Implementations/Playlists/PlaylistManager.cs10
1 files changed, 3 insertions, 7 deletions
diff --git a/Emby.Server.Implementations/Playlists/PlaylistManager.cs b/Emby.Server.Implementations/Playlists/PlaylistManager.cs
index 6724d54d1..6b169db79 100644
--- a/Emby.Server.Implementations/Playlists/PlaylistManager.cs
+++ b/Emby.Server.Implementations/Playlists/PlaylistManager.cs
@@ -85,12 +85,7 @@ namespace Emby.Server.Implementations.Playlists
{
foreach (var itemId in options.ItemIdList)
{
- var item = _libraryManager.GetItemById(itemId);
- if (item is null)
- {
- throw new ArgumentException("No item exists with the supplied Id");
- }
-
+ var item = _libraryManager.GetItemById(itemId) ?? throw new ArgumentException("No item exists with the supplied Id");
if (item.MediaType != MediaType.Unknown)
{
options.MediaType = item.MediaType;
@@ -139,7 +134,8 @@ namespace Emby.Server.Implementations.Playlists
Name = name,
Path = path,
OwnerUserId = options.UserId,
- Shares = options.Shares ?? Array.Empty<Share>()
+ Shares = options.Shares ?? [],
+ OpenAccess = options.OpenAccess ?? false
};
playlist.SetMediaType(options.MediaType);