mirror of
https://github.com/SoPat712/allstarr.git
synced 2026-02-10 07:58:39 -05:00
Fix JsonDocument.RootElement access in GetPlaylistTracks
This commit is contained in:
@@ -1270,7 +1270,7 @@ public class JellyfinController : ControllerBase
|
|||||||
{
|
{
|
||||||
// Get playlist info from Jellyfin to check the name
|
// Get playlist info from Jellyfin to check the name
|
||||||
var playlistInfo = await _proxyService.GetJsonAsync($"Items/{playlistId}", null, Request.Headers);
|
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() ?? "";
|
var playlistName = nameElement.GetString() ?? "";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user