Fix JsonDocument.RootElement access in GetPlaylistTracks

This commit is contained in:
2026-01-31 17:03:36 -05:00
parent 43718eaefc
commit e873cfe3bf

View File

@@ -1270,7 +1270,7 @@ public class JellyfinController : ControllerBase
{
// Get playlist info from Jellyfin to check the name
var playlistInfo = await _proxyService.GetJsonAsync($"Items/{playlistId}", null, Request.Headers);
if (playlistInfo != null && playlistInfo.TryGetProperty("Name", out var nameElement))
if (playlistInfo != null && playlistInfo.RootElement.TryGetProperty("Name", out var nameElement))
{
var playlistName = nameElement.GetString() ?? "";