From a3e738773bd7440c7e02f0929144c3fd1004bc1b Mon Sep 17 00:00:00 2001 From: edde746 <86283021+edde746@users.noreply.github.com> Date: Mon, 9 Mar 2026 07:47:37 +0100 Subject: [PATCH] fix: handle Metadata as list in DVR tune response --- lib/services/plex_client.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/services/plex_client.dart b/lib/services/plex_client.dart index bd2115a7..e6f82b79 100644 --- a/lib/services/plex_client.dart +++ b/lib/services/plex_client.dart @@ -2350,13 +2350,15 @@ class PlexClient { final nested = op['Metadata']; if (nested is Map) { metadataJson = nested; + } else if (nested is List && nested.isNotEmpty) { + metadataJson = nested.first as Map; } } } metadataJson ??= (container['Metadata'] as List?)?.firstOrNull as Map?; if (metadataJson == null) { - appLogger.w('Tune channel: no metadata in response'); + appLogger.w('Tune channel: no metadata in response (keys: ${container.keys.toList()}, subscriptions: ${subscriptions?.length}, firstSub: ${subscriptions?.firstOrNull})'); return null; }