Skip to content

Commit

Permalink
Do not fail user deletion if we have no playlist folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Shadowghost committed Jun 8, 2024
1 parent b25d6d1 commit b116a27
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Emby.Server.Implementations/Playlists/PlaylistManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,13 @@ await AddToPlaylistInternal(playlist.Id, request.ItemIdList, user, new DtoOption
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)
Expand Down

0 comments on commit b116a27

Please sign in to comment.