Merge pull request #12037 from Shadowghost/fix-user-delete

Do not fail user deletion if we have no playlist folder
This commit is contained in:
Bond-009 2024-06-15 17:34:21 +02:00 committed by GitHub
commit d90f504ca7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)