diff options
| -rw-r--r-- | Emby.Server.Implementations/Playlists/PlaylistManager.cs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/Playlists/PlaylistManager.cs b/Emby.Server.Implementations/Playlists/PlaylistManager.cs index 0fd9175dc..47ff22c0b 100644 --- a/Emby.Server.Implementations/Playlists/PlaylistManager.cs +++ b/Emby.Server.Implementations/Playlists/PlaylistManager.cs @@ -170,8 +170,13 @@ namespace Emby.Server.Implementations.Playlists private List<Playlist> GetUserPlaylists(Guid userId) { var user = _userManager.GetUserById(userId); + var playlistsFolder = GetPlaylistsFolder(userId); + if (playlistsFolder is null) + { + return []; + } - return GetPlaylistsFolder(userId).GetChildren(user, true).OfType<Playlist>().ToList(); + return playlistsFolder.GetChildren(user, true).OfType<Playlist>().ToList(); } private static string GetTargetPath(string path) |
