diff options
| author | Shadowghost <Ghost_of_Stone@web.de> | 2024-03-26 16:13:07 +0100 |
|---|---|---|
| committer | Shadowghost <Ghost_of_Stone@web.de> | 2024-03-26 16:13:07 +0100 |
| commit | f1dc1610a28fdb2dec4241d233503b6e11020546 (patch) | |
| tree | 20e23ac1cb9702e349a3b453657130108dcb7790 /Emby.Server.Implementations/Playlists | |
| parent | 88b3490d1756236d0c2fc00243420d45d149a5d1 (diff) | |
Extend playlist creation capabilities
Diffstat (limited to 'Emby.Server.Implementations/Playlists')
| -rw-r--r-- | Emby.Server.Implementations/Playlists/PlaylistManager.cs | 10 |
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); |
